Git Bash:远程错误:您可以';不要勉强git://github.com/

Git Bash:远程错误:您可以';不要勉强git://github.com/,git,git-push,Git,Git Push,请帮帮我,我怎样才能修复这个错误 $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 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
您可以在克隆中更改它,如下所示:

git remote set-url origin <THE-URL-HERE>
git remote set-url origin ssh://git@github.com/user/repo.git
git远程设置url源

我也有同样的错误,我在这里发现了这个错误:


来自github的错误消息非常具有误导性。它建议使用https://即使用户可以通过ssh密钥更容易地进行身份验证。 ssh的替代方案(希望更好)如下所示:

git remote set-url origin <THE-URL-HERE>
git remote set-url origin ssh://git@github.com/user/repo.git

通过使用GitHub在repo页面上为您提供的一个repo URL(通过HTTPS或vie SSH),不确定您首先从哪里获得了
git://
URL。顺便说一句,不要发布错误截图,将它们作为文本发布在标题使用的命令--$git clone中git://github.com//name_of_repo.gitWhere 你是从哪里得到这个URL的?GitHub显示了两个克隆选项(HTTPS/SSH),它们都没有使用git://URL。@ThiefMaster GitHub通过SSH“命令行指令”提供有问题的
git://
URL,用于合并拉取请求。奇怪…所以,如何替换
git://github.com/user/repo.git
https://github.com/user/repo.git
?将其添加到我的回答中尝试在Mac OS X 10.6.8上使用
https
会导致以下错误消息:
错误:错误:1407742E:SSL例程:SSL23\u GET\u SERVER\u HELLO:tlsv1警报协议版本,同时访问https://...............git
,因此感谢您提供此解决方案当您有
git://
时,它也不起作用,您必须将其设置为
git@