Problem pushing changes to stash

Hi

I've setup mirrors of some external repositories on stash. As this feature is currently not available on stash directly, this is working the following way:

  • Setup mirror clones of the external repositories via cmdline (Folder names ending with *.git)
  • Created corresponding repositories on stash
  • Added these repositories as remote location ([remote "stash"]) to the mirror'ed repositories
  • Setup cron job which performes the following actions:
    • git fetch # grab changes from original external repo
    • git push --all stash # push to stash
    • git push --tags stash # push to stash

This works with all configured external repositories with one exception, which is repo [1]. If pushing the changes to stash, I got the following error:

remote: Communication breakdown with Stash.        

To ssh://git@<removed-long-url>:7999/al/alpine-conf-mirror.git

 ! [remote rejected] alpine-conf-1.7.1 -> alpine-conf-1.7.1 (pre-receive hook declined)

 ! [remote rejected] alpine-conf-1.8.1 -> alpine-conf-1.8.1 (pre-receive hook declined)

 ! [remote rejected] v1.8 -> v1.8 (pre-receive hook declined)

 ! [remote rejected] v2.0 -> v2.0 (pre-receive hook declined)

 ! [remote rejected] v2.0_alpha1 -> v2.0_alpha1 (pre-receive hook declined)

 ! [remote rejected] v2.0_alpha2 -> v2.0_alpha2 (pre-receive hook declined)

 ! [remote rejected] v2.0_alpha3 -> v2.0_alpha3 (pre-receive hook declined)

 ! [remote rejected] v2.0_alpha4 -> v2.0_alpha4 (pre-receive hook declined)

 ! [remote rejected] v2.0_alpha6 -> v2.0_alpha6 (pre-receive hook declined)

 ! [remote rejected] v2.0_alpha7 -> v2.0_alpha7 (pre-receive hook declined)

 ! [remote rejected] v2.0_alpha8 -> v2.0_alpha8 (pre-receive hook declined)

 ! [remote rejected] v2.0_al?pha6 -> v2.0_al?pha6 (pre-receive hook declined)

 ! [remote rejected] v2.0_beta1 -> v2.0_beta1 (pre-receive hook declined)

 ! [remote rejected] v2.0_beta2 -> v2.0_beta2 (pre-receive hook declined)

 ! [remote rejected] v2.0_beta3 -> v2.0_beta3 (pre-receive hook declined)

 ! [remote rejected] v2.0_beta4 -> v2.0_beta4 (pre-receive hook declined)

 ! [remote rejected] v2.0_beta5 -> v2.0_beta5 (pre-receive hook declined)

 ! [remote rejected] v2.0_beta6 -> v2.0_beta6 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc1 -> v2.0_rc1 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc2 -> v2.0_rc2 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc3 -> v2.0_rc3 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc4 -> v2.0_rc4 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc5 -> v2.0_rc5 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc6 -> v2.0_rc6 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc7 -> v2.0_rc7 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc8 -> v2.0_rc8 (pre-receive hook declined)

 ! [remote rejected] v2.0_rc9 -> v2.0

error: failed to push some refs to 'ssh://git@<removed-long-url>:7999/al/alpine-conf-mirror.git'

I have no idea what's the problem here and it would be much appreciated to get this working! Thx a lot in advance.

Kind regards,

Yves

[1] http://git.alpinelinux.org/cgit/alpine-conf

1 answer

1 accepted

1 vote
Accepted answer

Hi Yves,

Sorry for the delay. It looks like one of the tags in that repository is corrupted, or at least not stored in UTF-8. This is causing our backend hook implementation to fail and reject the entire push:

! [remote rejected] v2.0_al?pha6 -> v2.0_al?pha6 (pre-receive hook declined)

My suggestion for now would be to remove/rename* that tag (it looks wrong anyway), which will allow you to proceed. I'll talk to the team on Monday and let you know if it's actually a bug, or something we just don't support.

Cheers,

Charles

* I fixed the problem on my machine by editing the '.git/packed-refs' file manually. It's not something you should normally do, but it's easier than trying to pass that tag name into 'git tag -d'. These are the lines corresponding the broken tag. If you want to delete the tag you will need to remove both lines.

69333487c536a9399349ded67e52e9c7d6f6503d refs/tags/v2.0_alÃpha6

^93d5de03310c1a9aeaadc1d2e719055195d846a5

Hi Charles,

thx for the answer. We removed the two lines on packed-refs and now the sync works as expected. Thx a lot for your help!

Kind regards,

Yves

HI Charles,

  We are seeing the same issue and we tried to remove the corrupt tag and retried however we are still facing the same issue.Any other cause for this?

Thanks

Regards

Vishnu

@Vishnu Reddy K Sorry, I haven't worked on Stash in a few years. Would suggest raising a support ticket.

https://support.atlassian.com/

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

258 views 3 7
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