egit - 未经授权 [英] egit - not authorized

查看:110
本文介绍了egit - 未经授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚从使用EGit的Eclipse Juno连接到GIT,并成功地克隆了某个远程存储库。在克隆期间,我输入了我的Github用户名和密码,但选择不保存。

I just connected to GIT from Eclipse Juno using EGit, and successfully cloned a certain remote repository. During the clone I entered my Github username and password, but chose not to save them.

然后我尝试从上游获取。我收到这个错误:

Then I tried to "Fetch from Upstream". I got this error:

https://github.com/biunlp/nlp-lab.git: not authorized

我没有机会输入我的用户名和密码...

I had no chance of entering my username and password...

这是奇怪的,因为我连接到这个存储库,以克隆...

This is strange since I connected to this repository in order to clone...

推荐答案

A。为每个遥控器单独指定凭据



A. To specify credentials individually for each remote


  1. 打开Git存储库视图,

  2. 打开 Remoting> origin><你的推送网址>

  3. 点击更改凭据...

(从用户指南 - 资源上下文菜单

如果要在同一台服务器上访问多个存储库,而不提供多次相同的凭据,则可以使用 .netrc 。这样,eGit将使用您提供的配置。

If you want to access multiple repositories on the same server without providing the same credentials multiple times, you may use .netrc. With this, eGit will use the configuration you provide.


  1. 创建一个名为 .netrc _netrc 在Windows中)在用户主目录中。

  2. 以这种形式向文件添加内容:

  1. Create a text file called .netrc (_netrc in Windows) in the user home directory.
  2. Add content to the file in this form:




    machine my.server1.com
    login yourUserName
    password yourPassword

    machine my.server2.com
    login yourUserName
    password yourPassword
The Stash documentation contains more information about .netrc

安全问题使用问题。 netrc这样的方式是密码以纯文本显示。请参阅此答案在Stackoverflow 中解决这个问题。

Security issue The problem with using .netrc this way is that the password is visible in plain text. Refer to this answer in Stackoverflow to solve that problem.

这篇关于egit - 未经授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆