curl - Git post-receive hook not working -


my setup windows xampp server, curl enabled, , git , hudson installed. hudson polls git every minute changes, , if finds them, creates build. use build testing server. works fine.

i set post-receive hook on central remote repository runs force build function of hudson.

i've created post-receive file called "post-receive" in hooks directory in central git repository, 1 pushed developers' local branches. each push own branch on central repository. want run post-receive build after every push, instead of having hudson poll git every minute.

when open shell remote server , run "post-receive" in hooks folder, runs. isn't being called when people push local repository copies central one.

maybe i'm not explaining right, it's how understand git.

the post-receive code 2 lines:

#!/bin/sh curl http://myserver.com:8080/hudson/job/myjobname/build?token=mytoken 

again, when open shell , run this, works, when pushes it, nothing happens, until minute or less goes by, hudson realizes git changed, , builds.

i happy clarify if need be. appreciated.

edit: after playing around it, feel maybe post-receive isn't executing because refs aren't being updated of something? git documentation says

it executes on remote repository once after refs have been updated.

does mean if nothing updates, won't execute? , if so, i'm pretty sure things updating anyway shouldn't apply.

here's process: make edits locally. commit edits. push head remote branch called 'mybranch' (not master branch, checked out) point @ want hook execute.

please check whether file has executable rights. otherwise can not executed. rwxr-xr-x should sufficient.

you can add missing bit with

$ chmod +x /path/to/post-receive 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -