fatal: remote error: You can't push to git://github.com/***.git Use https://github.com/***.git

拟墨画扇 提交于 2019-12-25 00:35:17

出现上述情况的可能原因是你git clone时用的是原生的git协议

例如 git clone git@github.com/username/user_repo.git

当然很多人用 git clone https://github.com/username/user_repo

其实用第一种方法clone仓库是快于第二种方法的,但是注意第一种这么clone下来不能直接git push

解决办法是

  • git remote rm origin \qquad 先把远程仓库删了
  • git remote add origin git@github.com:username/user_repo.git
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!