Dave Dave - 1 year ago 387
Git Question

Git error when trying to push -- pre-receive hook declined

I'm using the latest version of TortoiseGit on Win XP. When I try and push a change I've commited, I get the following error ...

git.exe push -v --progress "origin" iteration1:iteration1

remote: *********************************************************************
To ssh://git@mycogit/cit_pplus.git
! [remote rejected] iteration1 -> iteration1 (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@mycogit/cit_pplus.git'

What's going on? I attempted the push by right clicking in the folder in which my file was, clicking "TortoiseGit", selecting "Push" and clicking "OK".

Answer Source

You should ask whoever maintains the repo at git@mycogit/cit_pplus.git.

Your commits were rejected by the pre-receive hook of that repo (that's a user-configurable script that is intended to analyze incoming commits and decide if they are good enough to be accepted into the repo).

It is also a good idea to ask that person to update the hook, so it would print the reasons for the rejection.

If the maintainer is you yourself, then it looks like you've got a problem with your setup on the server-side. Please share more information then.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download