【发布时间】:2016-10-25 05:20:42
【问题描述】:
所以,我在另一台机器上设置了一个 repo。我已经提交并推送了文件,他们在 github.com 上查看得很好。现在,我在另一台机器上运行了git init,我正在尝试拉动。
# git remote set-url origin git@github.com:me/someproj.git
fatal: No such remote 'origin'
# git remote add origin https://github.com/me/someproj.git
# git pull
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/me/someproj.git/info/refs
fatal: HTTP request failed
# git remote -v
origin https://github.com/me/someproj.git (fetch)
origin https://github.com/me/someproj.git (push)
# git pull origin
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/me/someproj.git/info/refs
fatal: HTTP request failed
【问题讨论】:
-
请提供更多信息 - 您在那台机器上使用的是哪个 git 版本?你设置了用户名和密码吗?您是在防火墙后面还是在使用代理?
-
git 版本 1.7.1 并且不,我不支持代理,我知道。我不确定我是否设置了用户/通行证。
-
这可能是您的问题,请使用
git config --global user.name your_username设置它并对您的密码执行相同操作。 -
@ShmulikKlein user.name 与身份验证无关。