请帮帮我,我该如何解决这个错误?
$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
Run Code Online (Sandbox Code Playgroud)
Thi*_*ter 30
使用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>
Run Code Online (Sandbox Code Playgroud)
小智 8
我有同样的错误,这对我有用,我在这里找到了: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
Run Code Online (Sandbox Code Playgroud)
来自 github 的错误消息非常具有误导性。它建议使用 https:// 即使用户可以通过 ssh 密钥更轻松地进行身份验证。ssh 的(希望更好)替代方案如下所示:
git remote set-url origin ssh://git@github.com/user/repo.git
Run Code Online (Sandbox Code Playgroud)