github文件没有提交 [英] github file not getting committed

查看:107
本文介绍了github文件没有提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是GitHub的新手,但是我已经按照以下步骤创建了一个回购:

  $ mkdir fb 
$ cd fb
$ git init
$ git add自述文件
$ git commit -m'第一次提交'
$ git push origin master

现在,当我尝试进行第一次提交时,出现以下错误:

  $ git push origin master 
错误:无法访问URL https://github.com/xxx/yyy/,返回代码60
错误:未能推送一些引用'https://github.com/xxx/yyy'

我使用最新的git版。为什么GitHub抛出这个不寻常的错误,我该如何解决它?

解决方案

如果您尝试使用SSH协议作为git存储库,例如 git@github.com:xxx / yyy.git ,看看它是否适合您?

$ git remote rm origin



$ git remote add origin git@github.com:xxx / yyy.git


I am new to GitHub, but I have followed the steps to create a repo:

$ mkdir fb
$ cd fb 
$ git init 
$ git add README 
$ git commit -m 'first commit'
$ git push origin master

Now when I try to make my first commit, I get the follwowing error:

$ 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'

I am using the latest git version. Why does GitHub throw this unusal error and how do I fix it?

解决方案

What if you try using the SSH protocol for the git repository, e.g. git@github.com:xxx/yyy.git, and see if that works for you?

$ git remote rm origin

$ git remote add origin git@github.com:xxx/yyy.git

这篇关于github文件没有提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆