我尝试为我们的项目设置 git 和 gitosis。对于 gitosis 的设置,我遵循了这篇文章http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way因为这是第一次使用 git。
我在运行 gitosis-init 时遇到问题。我不知道发生了什么或如何检查。
请帮助我检查或做什么。事实上,我甚至不知道这是否是个问题,因为我刚开始使用 Linux、git 等。
Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/
Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/
Traceback (most recent call last):
File "/usr/bin/gitosis-init", line 8, in <module>
load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')()
File "/usr/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/app.py", line 24, in run
return app.main()
File "/usr/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/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/init.py", line 140, in handle_args
run_hook.post_update(cfg=cfg, git_dir=admin_repository)
File "/usr/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/run_hook.py", line 40, in post_update
path=os.path.join(generated, 'projects.list'),
File "/usr/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/gitweb.py", line 109, in generate_project_list
f = file(tmp, 'w')
IOError: [Errno 13] Permission denied: '/home/git/gitosis/projects.list.30470.tmp'
提前致谢。
答案1
您应该删除 /home/git/gitosis。
$ sudo rm -rf /home/git/gitosis
因为您刚刚移动了具有其他权限的 gitosis 文件。
答案2
尝试将 .ssh 目录的所有者设置为 git:
sudo chown -R git:git /home/git/.ssh