私有存储库(Centos)上的git克隆时出错

时间:2014-11-27 13:20:27

标签: git

我正在使用Centos,当我尝试从Github.com克隆我的私人存储库时,我有一个奇怪的错误

我只是做

git clone https://github.com/Clemzd/GCLChallenge.git

我收到了这个错误:

Initialized empty Git repository in /home/makeitgreen/Documents/GCLChallenge/.git/
error: The requested URL returned error: 403 Forbidden while accessing     
https://github.com/Clemzd/GCLChallenge.git/info/refs
fatal: HTTP request failed

听起来我没有很好地配置我的git。我记得我这样做是为了保存我的密码,错误可能来自于此但我不知道如何取消它。

git config --global credential.helper wincred

我尝试了另一台机器,它运行良好,因为它问我的凭据。

感谢您的帮助!

解决方案:我的centos有一个git版本< 1.7.9并且我必须将凭证指定为URL的一部分,所以我将版本改进为2.2.0,现在它可以工作了!

1 个答案:

答案 0 :(得分:0)

为什么你甚至在Centos上指定wincred?  您可以尝试使用git config --global --unset credential.helper

取消设置

然后阅读http://git-scm.com/docs/gitcredentialsIs there a way to skip password typing when using https:// github