Git 远程网址还可以,但推送不可能,因为网址不同



我在 git 上遇到了一个奇怪的问题。为了简单解释,我只是克隆了一个 git 存储库,进行一些更改,添加、提交和推送。除了推送命令外,一切正常。

git push -u origin master
fatal: http://myusername@www.mygit.com/pathto/cv.git/info/refs not valid: is this a git repository?

为什么我的网址上有那个/info/refs??当我检查时,我没有那个。

git remote -v
origin  http://myusername@www.mygit.com/pathto/cv.git (fetch)
origin  http://myusername@www.mygit.com/pathto/cv.git (push)

git config -l | grep remote.origin.url
remote.origin.url=http://myusername@www.mygit.com/pathto/cv.git

感谢您未来的回答

经过一些研究,似乎这是我的 Ubuntu 16.04 上的 git-usercontent-plugin 的一个错误,当通过 http 克隆到较新版本的 git 时,它报告了 info/refs 无效。目前,我发现的唯一解决方法是克隆,然后通过SSH推送

git clone ssh://git@www.mygit.com:[PortNumberIfIs]/pathto/cv.git

相关内容

最新更新