agent git push with msysgit hangs on windows

Earlier this was working (just upgraded to 8.1, but I don't think this is related. I was on 8.0.4 earlier).

So far the only way I could do a git push to an atlassian stash hosted git repository with teamcity (from agent, during build script execution) was like:

* set up ssh/keys and all the hassle (fetch/pull works nicely)
* use a custom shell script that will be run by msysgit's bash.exe:


. /etc/profile

DIR=$(echo $1 | sed 's/\\/\//g')
# now we go into
cd $DIR

#$2 is the commit msg
git commit -a -m "$2"
git push

* this script is called as a last build step from teamcity, a command line runner:
"C:\Program Files (x86)\Git\bin\bash.exe" d:\tools\bin\ "" "%mycommitmsg%"


This was working nicely. All of a sudden, this stopped working, and I have a hang with the teamcity agent process when the last command is called (git push). (Note: If I don't do it this way, eg simply call git push from the command line, it does not work. At least it did not work earlier).
But now, my solution stopped working, and it is driving me crazy why it is hanging (If i run the command manually as the same user as the teamcity agent service is running, it works).

Any hint would be appreciated. Thanks!

1 comment
Comment actions Permalink

... and now it is working again... this is very strange


Please sign in to leave a comment.