【发布时间】:2018-10-05 19:18:52
【问题描述】:
我在 git Bash 中写了这个
git remote -v
origin git://github.com/devRena/test (fetch)
origin git://github.com/devRena/test (push)
当我说
git push origin master
fatal remote error:
You can't push to git://github.com/devRena/test.git
Use https://github.com/devRena/test.git
如何将 git://github.com/devRena/test.git 改成https://github.com/devRena/test.git ??
【问题讨论】:
-
git remote set-url origin https://github.com/devRena/test.git。要仅更改推送 url,请添加选项--push。顺便说一句,git push https://github.com/devRena/test.git master也可以使用一次。 -
我做了但没有改变,我有同样的错误
-
git push github.com/devRena/test.git master fatal: remote error: You can't push to git://github.com/devRena/test.git 使用github.com/devRena/test.git
-
运行
git config -l查看是否有url.xxx.pushinsteadof或url.xxx.insteadof。 -
所以它是由
url.git://.insteadof=https://引起的。通过删除或评论从 gitconfig 禁用它。