我是靠谱客的博主 舒服店员,这篇文章主要介绍解决fatal:remote error:You can\'t push to 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://的全部内容,更多相关解决fatal:remote内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(197)

评论列表共有 0 条评论

立即
投稿
返回
顶部