Gitosis post-update wont run
Im running cygwin on a windows vista pc. Ive successfully installed sshd, configured, and built gitosis. I can remotely git clone the gitosis-admin.git repository, made a change to the config, committed and pushed back to cygwin machine successfully.
However the post-update doesnt execute and the new repository (as specified in the config) have not created.
I have run:
chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
and an ls -l shows the following:
-rwxr-xr-x 1 git None 69 2010-04-13 22:55 post-update
yet, when I run:
./post-update
I receive the following error:
ERROR:gitosis.run_hook:Must have GIT_DIR set in enviroment
Ive included in my git .bashrc the line:
GIT_DIR=$HOME/repositories/gitosis-admin.git/
and if I type Set at the prompt, I can see:
GIT_DIR=/home/git/repositories/gitosis-admin.git/
What else can I try, because Im开发者_运维百科 running out of ideas.
First of all, don't set GIT_DIR
-- it shouldn't be necessary.
Secondly, I believe your issue is that you have added write permission for a new repo to your Gitosis config, but it's not being created when you push your config. That's because adding a new repo to your Gitosis config doesn't create it -- it just gives a user permission to create it.
For example, let's say you add this go your Gitosis config:
[group new_repo]
members = me
writable = new_repo
When you push the changes out, new_repo
does not get created -- you merely have permission to create it. In order to actually create it on the server, create the repo on your local machine, and then add your Gitosis server as a remote:
$ git remote add gitosis git@git.example.com:new_repo.git
And then push it out:
$ git push gitosis master
The new repo will be created when you do the git push
.
精彩评论