请帮我,我该如何解决这个错误?
$git push origin dev
fatal: remote error:
You can't push to git://github.com//name_of_repo.git
Use https:://github.com//name_of_repo.git
请使用HTTPS或SSH URL,而不是git://github.com/user/repo.git
。可以使用以下其中一个:
https://github.com/user/repo.git
git@github.com:user/repo.git
您可以像这样更改克隆中的URL:
git remote set-url origin <THE-URL-HERE>
git://github.com/user/repo.git
替换为 https://github.com/user/repo.git
? - Yuriy Lisovskiy我遇到了同样的错误,这个方法对我有用。我在这里找到了它:https://coderwall.com/p/7begkw/fatal-remote-error-you-can-t-push-to-git
git remote rm origin
git remote add origin git@github.com:user/repo.git
git push origin master
https
会导致以下错误消息:error: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version while accessing https://...............git
,因此感谢您提供的解决方案。 - NuclearPeongit://
时,它也不起作用,你必须将其设置为 git@
。 - NuclearPeonGithub给出的错误信息有些误导人,它建议使用https://,即使用户可以通过ssh密钥更轻松地进行身份验证。相比之下,使用ssh的(希望更优秀的)替代方法如下:
git remote set-url origin ssh://git@github.com/user/repo.git
git://
URL 来合并拉取请求。很奇怪... - ntc2