egit - 未经授权 [英] egit - not authorized
问题描述
我刚从使用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
- 打开Git存储库视图,
- 打开
Remoting> origin><你的推送网址>
- 点击更改凭据...
如果要在同一台服务器上访问多个存储库,而不提供多次相同的凭据,则可以使用 .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.
- 创建一个名为
.netrc $ c的文本文件$ c>(
_netrc
在Windows中)在用户主目录中。 - 以这种形式向文件添加内容:
- Create a text file called
.netrc
(_netrc
in Windows) in the user home directory. - 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屋!