问题
I'm testing my new Git repository. I converted from Subversion to Git, no problem.
Now, on my laptop
git remote add origin git@server:test.git
returns correctly. But when I do
git push
I get
error:gitosis.serve.main:repository read access denied
And when I go to /srv/git/repositories
on the server, the new repository isn't created.
Is there a log file that I can look at somewhere to figure out what's going on?
回答1:
Carefully follow the "Setting Up" portion of the README. It describes access control. You'd be much better off using gitolite instead. It's easier to use and better-documented. Gitosis is pretty much dead.
回答2:
Repositories cannot be created with git push
. You have to use git init --bare
on the server for that.
回答3:
I went ahead and switched to Gitolite. After tracking down some SSH issues it worked fine. Gitolite generates the repositories on the server when you push it.
来源:https://stackoverflow.com/questions/7031985/gitosis-wont-create-repository