I did some searching and tried a few things to get an answer to this question but not having any luck. My post-receive script runs fine if I run it from bash. Also, I have changed the git to a full version that does not come with the Bonobo download. I have anonymous set so anyone can pull from the repository to make sure that doesn't cause the issue. Does anyone have some ideas I can try out?
Asked
Active
Viewed 2,998 times
1 Answers
3
As mentioned in this thread
Bonobo Git Server itself doesn't provide any interface for adding hooks, but the underlying repositories are stored on the server as the classic bare ones.
Therefore, you can add hooks and other functionality as you would normally do on your local git repository, but do it on the server.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
Hello VonC thanks for the reply. I did run across that thread when searching but I am not sure what that means. Does this mean that I have to go into the repositories directory and init my own git folders and add it to the repositories table to have it use hooks or go to that folder and do some kind of init on the folder created using Bonobo? – Silas Oct 12 '14 at 16:18
-
@Silas The "repositories directory" already has git repos: bare git repos created each time you declare a new repo through the Bonobo web GUI (http://stackoverflow.com/questions/24115224/concept-of-bare-shared-repository-in-git/24115534#24115534). You need to go the bare repo folder in the Bonobo server (in `C:\inetpub\wwwroot\Bonobo.Git.Server\App_Data\Repositories\myrepo.git`: https://github.com/jakubgarfield/Bonobo-Git-Server/blob/2f3fa5df5440e041d9a1ccb1838e1d110b43c7f7/Bonobo.Git.Server/web.config#L15), and add your hook in there (`myrepo.git\hooks\post-receive`) – VonC Oct 12 '14 at 16:27
-
thanks again I got it working. I looked at the naming of the file and the example you provided did not have an extension for post-receive. I was using post-receive.sh so I think that might be why it did not work. I took a look at [This](http://www.realchaseadams.com/2014/01/22/deploy-code-with-git-push-and-a-post-receive-hook/) guide to make a file. Everything is working now. – Silas Oct 12 '14 at 21:27
-
1@Silas I confirm: any hook must *not* have any extension attached to its name. – VonC Oct 13 '14 at 05:31