jakubgarfield / Bonobo-Git-Server

Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
http://bonobogitserver.com
MIT License
1.81k stars 605 forks source link

post-receive hook won't call a git push #822

Open pixelknight opened 5 years ago

pixelknight commented 5 years ago

I'm having some difficulty in getting a git push to happen in a post-receive hook, the actual hook is executed but the git push does not run at all.

Here is my post-receive


#!/bin/sh
#
# Place appropriately named executable hook scripts into this directory
# to intercept various actions that git takes.  See `git help hooks` for
# more information.
echo "Pushing remote " >> /c/Dev/Repos/git/reponame/commit.log
cd /c/Dev/Repos/git/reponame/
git push avalon master

Now when I push to the repo, I know the script is being executed as I can see entries in that commit.log, however what is not happening is the last git push isn't executing. (I've also tried putting in the full path to git.exe, that made no difference)

If I open a git terminal and run that post-receive script in there, it all works fine so I know the script is working, it just won't execute as part of the actual post-receive process.