Git 远程 url 可以,但无法推送,因为 url 不同
Git remote url is ok but push impossible because url is different
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?
为什么我的 url 上有那个 /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
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?
为什么我的 url 上有那个 /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