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
.