Search code examples
gitgitolite

git push initial to gitolite repository fails with index-pack not a git command


I added a repo to gitolite-admin conf and pushing it successful

Now I wanted to import an exiting repository

when I invoke a git push --all git@gitserver:mybeerrepo

I get git: 'index-pack' is not a git-command. error: pack-objects died with strange error error: failed to push some refs to ...

I checked the .bashrc file for that user and the path looks okay

git gc in that repository seems to work well too

no idea what to do next now :-7


Solution

  • The problem was caused by an old version of git

    There seems to be a bug in the git version 1.6.x.x which had been installed on the Server where gitolite is running.

    The Client was on 1.7.9.5 the server on 1.6.x.x. Even doing the push from the server did fail.

    As a git gc is working well the problem seems to exist only when the index-packer is run through push ssh and gitolite and there are some specific files in the repo, maybe kind, size. To get rid of this ...

    Install new git version on Suse Sles10

    I installed a new version of git from source on the SLES 10 box as there are no compatible rpms for older suse releases.

    cd /root  
    wget git-core.googlecode.com/files/git-1.7.8.4.tar.gz  
    tar -xvpzf git-1.7.8.4.tar.gz  
    cd git-1.7.8.4 
    ./configure --without-python  
    make  
    make install  
    

    create symlinks (if needed remove old git references before)

    cd /usr/bin  
    ln -s /usr/local/libexec/git-core/git  
    ln -s /usr/local/libexec/git-core/git-receive-pack   
    ln -s /usr/local/libexec/git-core/git-shell  
    ln -s /usr/local/libexec/git-core/git-upload-archive  
    ln -s /usr/local/libexec/git-core/git-upload-pack`