我是 GitHub 新手,但我已按照以下步骤创建存储库:
$ mkdir fb
$ cd fb
$ git init
$ git add README
$ git commit -m 'first commit'
$ git push origin master
现在,当我尝试进行第一次提交时,我收到以下错误:
$ git push origin master
error: Cannot access URL https://github.com/xxx/yyy/, return code 60
error: failed to push some refs to 'https://github.com/xxx/yyy'
我正在使用最新的 git 版本。为什么 GitHub 会抛出这个不寻常的错误以及如何修复它?
最佳答案
如果您尝试对 git 存储库使用 SSH 协议(protocol)怎么办? <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2d4a44596d4a445945584f034e4240" rel="noreferrer noopener nofollow">[email protected]</a>:xxx/yyy.git
,看看这对你有用吗?
$ git remote rm origin
$ git remote add origin <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="22454b5662454b564a57400c414d4f" rel="noreferrer noopener nofollow">[email protected]</a>:xxx/yyy.git
关于github 文件未提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12461682/