代码之家  ›  专栏  ›  技术社区  ›  kingoleg

Git Push致命:不是Git存储库:“”。

git
  •  1
  • kingoleg  · 技术社区  · 15 年前

    我不明白为什么“致命”在这里?事实上,所有的承诺都是推送的。

    oleg@shoom-gnome:(master)~/workspace/S4$ git push
    Counting objects: 5, done.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 280 bytes, done.
    Total 3 (delta 2), reused 0 (delta 0)
    To ssh://account@host/var/git/S4
       79ea0f2..6e8a193  master -> master
    fatal: Not a git repository: '.'
    
    2 回复  |  直到 15 年前
        1
  •  3
  •   Michael Krelin - hacker    15 年前

    好吧,如果 /var/git/S4 在遥远的地方 一个Git存储库,那么,也许是hook脚本中发生了什么?

    而且,把我的评论复制到凯马尔什的回答上,我刚刚投了反对票:我建议 account@host:/var/git/S4 而不是ssh的类似url的表单。

        2
  •  1
  •   kmarsh    15 年前

    替换:

    ssh://account@host/var/git/S4
    

    具有

    ssh://account@host//var/git/S4
    

    获取完整路径,而不是与帐户的home dir相关的路径。