华域联盟 Linux 解决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问题的办法

解决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 [email protected]:username/*.git

看来我是没有权限push啊。

解决方法:

git remote rm origin
git remote add origin [email protected]:username/resname.git

接下来就可以push了。 

这个问题一般是clone的时候选择的协议导致的。如果是用的git://github.com/userna/userrepository.git。只有读的权限,不能写入。导致不能push。

要用ssh协议才能push所以clone用[email protected]:username/userrepository.git

用ssh还必须要创建一个SSH Key。并把公钥填写到用户在GitHub的信息里。具体看GitHub的相应帮助

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

您可能感兴趣的文章:

本文由 华域联盟 原创撰写:华域联盟 » 解决fatal:remote error:You can't push to git://github.com/username/*.git问题的办法

转载请保留出处和原文链接:https://www.cnhackhy.com/55211.htm

本文来自网络,不代表华域联盟立场,转载请注明出处。

作者: sterben

发表回复

联系我们

联系我们

2551209778

在线咨询: QQ交谈

邮箱: [email protected]

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部