1

I'm trying to use gitosis https://github.com/res0nat0r/gitosis And I do this as the setting up section in its README.md.

When I input sudo -H -u git gitosis-init </.ssh/id_rsa.pub, the error message show like this:

fatal: cannot copy '/usr/local/lib/python2.7/dist-packages/gitosis-0.2-py2.7.egg/gitosis/templates/admin/hooks/post-update' to '/srv/pspms/git/repositories/gitosis-admin.git/hooks/post-update': Permission denied Traceback (most recent call last): File "/usr/local/bin/gitosis-init", line 9, in <module> load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')() File "/usr/local/lib/python2.7/dist-packages/gitosis-0.2-py2.7.egg/gitosis/app.py", line 24, in run return app.main() File "/usr/local/lib/python2.7/dist-packages/gitosis-0.2-py2.7.egg/gitosis/app.py", line 38, in main self.handle_args(parser, cfg, options, args) File "/usr/local/lib/python2.7/dist-packages/gitosis-0.2-py2.7.egg/gitosis/init.py", line 138, in handle_args user=user, File "/usr/local/lib/python2.7/dist-packages/gitosis-0.2-py2.7.egg/gitosis/init.py", line 75, in init_admin_repository template=resource_filename('gitosis.templates', 'admin') File "/usr/local/lib/python2.7/dist-packages/gitosis-0.2-py2.7.egg/gitosis/repository.py", line 66, in init raise GitInitError('exit status %d' % returncode) gitosis.repository.GitInitError: exit status 128

It seems I haven't perimssion to copy file to the git HOME directory? But I use the command sudo.

Leo Gao
  • 629
  • 1
  • 6
  • 17
  • Why gitosis, which is dead since 2009, and not gitolite? (https://github.com/sitaramc/gitolite) – VonC Feb 27 '15 at 06:29
  • @VonC I want to deploy a git server, and I find gitosis, I'll check gitolite, thank you. – Leo Gao Feb 27 '15 at 07:16

1 Answers1

0

Your user git doesn't have access to one of the directories in the following log output:

fatal: cannot copy '/usr/local/lib/python2.7/dist-packages/gitosis-0.2-py2.7.egg/gitosis/templates/admin/hooks/post-update' to '/srv/pspms/git/repositories/gitosis-admin.git/hooks/post-update': Permission denied

Run ls -la /srv/pspms/git/repositories/gitosis-admin.git and make sure your git user can access that directory, and the same for /srv/pspms/git/repositories/gitosis-admin.git.

acanby
  • 2,936
  • 24
  • 26