We're using Atlassian Stash v3.4.0 and failed to push our changes to repository (no matter master or other branches) recently.
Here is the error message.
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.22 MiB | 0 bytes/s, done.
Total 7 (delta 3), reused 0 (delta 0)
To ssh://git@hkwapd08:7999/abc/abc-quote.git
! [remote rejected] hotfix/2.2.7 -> hotfix/2.2.7 (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@hkwapd08:7999/abc/abc-quote.git'
It mentioned that the pre-receive hook declined the git push.
But we didn't have any changes in the hook setting in Stash.
Can anyone offer some insight?
Hi GLIT! Looks like your commits were rejected by the pre-receive hook of that repo. It would be a good idea to ask the creator of the script to update the hook so it would print the reasons for the rejection.
I also found a similar issue described in the article https://confluence.atlassian.com/bitbucketserverkb/pre-receive-hook-declined-894219354.html Can you check your logs and see if you're affected by that?
Lastly, after some research I found some other users experiencing this issue and it got fixed by simply restarting the Stash server, can you try that too?
Let us know!
Ana
Hi Ana,
I've read the article you found. But we don't have
expected committer name
expected committer email
message in the one we captured in the question. So that's not our case.
I've also restarted the Stash server but the problem still exists.
I can say the problem exists in all the repo in Stash recently
We didn't create any customized pre-receive hook script and could you show us how to check any hook script we may have (by default) and print the reasons for the rejection in it?
Thanks
GLIT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.