2

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.

Andy
  • 438
  • 1
  • 5
  • 8
  • I haven't used cygwin in years, so I forget -- does it import environment properties from Windows as well? You could try setting the property in Windows. – ebneter Apr 14 '10 at 18:53
  • Same problem here. @Andy have you any news about this problem? – edigu Dec 22 '10 at 21:43

1 Answers1

1

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.

mipadi
  • 398,885
  • 90
  • 523
  • 479
  • 1
    I tried committing a new_repo project, that failed too. only one response, fatal: The remote end hung up unexpectedly. Interestingly I logged into the cygwin bash, manually created a new_repo git project under repositories folder. And that I cannot clone either. Yet getting gitosis-admin.git bares no problem. – Andy Apr 15 '10 at 19:14
  • @Andy, hello, have you fixed the problem? – xiao 啸 Dec 03 '10 at 14:40