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

无法更改目录或不是Git存档

git
  •  7
  • collimarco  · 技术社区  · 16 年前

    我创建了一个远程裸机存储库:

    cd ~
    mkdir -p git/foto-fiori.git
    cd git/foto-fiori.git
    git init --bare
    

    然后我又加了一句:

    git remote add origin collimarco@foto-fiori.com:/home/collimarco/git/foto-fiori.git

    我得到:

    $ git push
    fatal: '/home/collimarco/git/foto-fiori.git': unable to chdir or not a git archive
    fatal: The remote end hung up unexpectedly

    我也试过使用~/git/foto-fiori.git,但还是一样的……

    我绝望了:我该怎么办?

    4 回复  |  直到 13 年前
        1
  •  1
  •   Bombe    16 年前

    尝试添加 : 在主机名之后:

    git add origin collimarco@foto-fiori.com:/home/collimarco/git/foto-fiori.git
    

    这样还可以跳过主目录,也就是说:

    git add origin collimarco@foto-fiori.com:git/foto-fiori.git
    
        2
  •  1
  •   artagnon    16 年前

    第一步:检查 ssh -vvv collimarco@foto-fitori.com 使用公钥身份验证。您可能想了解一下Gitosis——它简化了轻松、安全地托管Git存储库的过程。[ http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way] .

        3
  •  1
  •   collimarco    16 年前

    DreamHost正在迁移到其他服务器。

        4
  •  1
  •   jaromrax    13 年前

    我也有同样的错误,因为我把远程(裸机)目录放在了别处。如果有人收到这个消息,我建议简单地检查一下远程目录是否存在于它真正应该存在的地方。 我(从科里马尔科的前一篇文章)预计这是同一个问题。