所以,我在另一台机器上设置了一个存储库。我已经提交并推送了文件,并且它们在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 config --global user.name 你的用户名
进行设置,密码也同样如此。 - Shmulik Klein