github 文件未提交

标签 github

我是 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/

相关文章:

本地 Jenkins 服务器上的 Github Webhook

GitHub无法重新建立我的功能分支: "This branch cannot be rebased due to conflicts"

javascript - GitHub API v3 : Getting 404 error on creating issues

git - 适用于 Node.js 的 `.gitignore`

javascript - 没有为链接的 github url 下载 package-lock.json

git - 搞乱了我本地的 git 分支。我如何恢复到干净工作的主分支

git - 有没有办法将 pull 请求转回草稿 pull 请求?

c# - 使用 libgit2sharp 克隆和推送

iphone - 无法使用 Git 集成提交 Xcode 项目

Git - 将分支存储在单独的本地目录中