[英]Pushing local git repository from Matlab fails: You can't push to git://github.com/user/repo.git use https://github.com/user/repo.git
[英]Git Bash: remote error: You can't push to git://github.com/
請幫幫我,我該如何解決這個錯誤?
$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>
我有同樣的錯誤,這對我有用,我在這里找到了: 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
來自github的錯誤消息非常具有誤導性。 它建議使用https://即使用戶可以通過ssh密鑰更容易地進行身份驗證。 使用ssh的(希望是優越的)替代方案如下所示:
git remote set-url origin ssh://git@github.com/user/repo.git
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.