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)
! [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!
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?
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot