Am I the only person who’s found git 1.6.0 doesn’t work with gitosis 0.2? I found a couple references to this error trying to check out the gitosis-admin project, but no solutions—at least not the one I had to make up.
mpaschal@hostname:~$ git clone git@hostname:gitosis-admin.git
Initialized empty Git repository in /home/mpaschal/gitosis-admin/.git/
Traceback (most recent call last):
File "/usr/local/bin/gitosis-serve", line 8, in <module>
load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-serve')()
File "/usr/local/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/app.py", line 24, in run
return app.main()
File "/usr/local/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/app.py", line 38, in main
self.handle_args(parser, cfg, options, args)
File "/usr/local/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/serve.py", line 192, in handle_args
os.execvp('git-shell', ['git-shell', '-c', newcmd])
File "/usr/local/lib/python2.5/os.py", line 353, in execvp
_execvpe(file, args)
File "/usr/local/lib/python2.5/os.py", line 389, in _execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory
fatal: The remote end hung up unexpectedly
mpaschal@hostname:~$
gitosis sets up so it runs git-shell as the git user’s login command, but git 1.6.0 apparently installs everything in the “gitexecdir,” which by default ends up /usr/local/libexec/git-core. Which of course is not on the user’s path. Normally that’s fine since you write git command and /usr/local/bin/git rewrites that as git-command, and /usr/local/bin/git knows exactly where all those are, but that means you can’t yourself run git-shell directly.
The gitosis directions I was looking at also suggest making /bin/sh the git user’s shell, which means .bash_profile isn’t evaluated on login. So I couldn’t just add /usr/local/libexec/git-core to git’s PATH (even if I put it in regular .profile—dunno if I was goofing it up somehow, or if ssh default commands don’t start the shell first, or what).
I gave up and copied git-shell to /usr/local/bin, where regular git lives.
untitled
ln -sf /usr/libexec/git-core/git-shell /usr/bin/git-shell