【问题标题】:Git remote url is ok but push impossible because url is differentGit 远程 url 可以,但无法推送,因为 url 不同
【发布时间】:2017-10-14 11:14:16
【问题描述】:

我在使用 git 时遇到了一个奇怪的问题。 简单来说,我只是克隆了一个 git 存储库,进行了一些更改、添加、提交和推送。一切正常,除了 push 命令。

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

提前感谢您未来的回答

【问题讨论】:

    标签: git url repository push


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-18
      • 2018-03-23
      • 1970-01-01
      • 2018-06-24
      • 2010-10-25
      • 2010-10-31
      • 1970-01-01
      相关资源
      最近更新 更多