脚本宝典收集整理的这篇文章主要介绍了解决fatal:remote error:You can't push to git://github.com/username/*.git问题的办法,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
解决fatal:remote error:You can't push to gIT://github.COM/username/*.git问题的办法
今天Git push的时候
fatal:remote error: You can't push to git://github.com/username/*.git Use git@github.com:username/*.git
看来我是没有权限push啊。
解决方法:
git remote rm origin git remote add origin git@github.com:username/resname.git
接下来就可以push了。
这个问题一般是clone的时候选择的协议导致的。如果是用的git://github.com/userna/userrepository.git。只有读的权限,不能写入。导致不能push。
要用ssh协议才能push所以clone用git@github.com:username/userrepository.git
用ssh还必须要创建一个SSH Key。并把公钥填写到用户在GitHub的信息里。具体看GitHub的相应帮助
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
以上是脚本宝典为你收集整理的解决fatal:remote error:You can't push to git://github.com/username/*.git问题的办法全部内容,希望文章能够帮你解决解决fatal:remote error:You can't push to git://github.com/username/*.git问题的办法所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。