GIT Code Publishing Error "Pre Receive Hook Declined"

While publishing the code to GIT, how to resolve the Error "pre-receive hook declined" thrown?

Error Description: Pre- Receive Hook Declined

image.png



Resolution: This error originates from Git remote branch, indicating that it is rejecting the commit performed. Perform the below steps

  1. Change parameters on the repository
  2. Go to GitLab->Settings->Repository->Protected Branches
  3. Unprotect the branch.


Event Viewer Log from the machine (Event Viewer -> Windows Logs -> Application) will be helpful to debug, if further error exists.

Read more on StackOverflow .

1 Like