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

人盡茶涼 提交于 2020-01-17 04:52:05

问题


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


回答1:


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`  


来源:https://stackoverflow.com/questions/12646748/git-push-initial-to-gitolite-repository-fails-with-index-pack-not-a-git-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!