在“服务器”上推送存储库

时间:2012-01-04 15:02:28

标签: git

我正在尝试为我的项目创建第二个存储库。所以我已经在我的debian上安装了 gitolite 并且我配置了它:

CONF / gitolite.conf

repo    gitolite-admin
        RW+     =   git
        RW+     =   bux

repo    testing
        RW+     =   @all

repo    myprojectname
        RW+     =   bux

对于gitolite-admin repo我可以拉动和推动。 但我的 myprojectname 存在问题。我在我现有的项目中,我已经配置了" origin":

的.git /配置

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = git@myserver.domain.tdl:/home/git/repositories/myprojectname.git
        fetch = +refs/heads/*:refs/remotes/origin/*

所以,当我尝试推动时:

  

$ git push origin master

     

致命:' /home/git/repositories/myprojectname.git'   似乎不是一个致命的git存储库:远程端挂了   出乎意料


如果我在我的服务器上查看了'文件夹'不存在:

ls -l /home/git/repositories/
total 8
drwx------ 8 git git 4096  4 janv. 14:20 gitolite-admin.git
drwx------ 7 git git 4096  4 janv. 14:20 testing.git

我错过了什么?

2 个答案:

答案 0 :(得分:0)

此SO问题中的一些有用答案:gitolite installation issue

请特别注意第3个答案,其中显示如果您没有遵循信函的安装说明,您将如何得到此错误。特别是,如果SSH密钥提供shell,则会发生此问题。

我会密切关注SSH troubleshooting文件,该文件可以帮助您确定这是否是问题。

答案 1 :(得分:0)

首先测试您的连接。 'ssh -v gituser @ server'将显示正在显示的密钥。还要确保已将公钥提交到管理项目。