Unable to push to repository in Stash

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?

1 answer

This widget could not be displayed.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,221 views 8 11
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you