Error when creating a Pull Request in Repository

Hi,


Just starting out on stash here and I have had the following error code when trying to select a source branch when creating a Pull Request within one of my repositories.

Below is the error;

An error occurred while executing an external process: '/usr/bin/git for-each-ref --sort=-committerdate --format=%(refname)|%(refname:short)|%(objectname) refs/heads/' exited with code 128 saying: fatal: missing object 0000000000000000000000000000000000000000 for refs/heads/feature-fix-honolulu-unit-tests

Any help would be massively appreciated?


Thanks.

1 answer

As this issue is resolved in a support ticket, here is the resolution for reference:

Problem

"feature-fix-honolulu-unit-tests" exist in Stash filesystem but the remote ref is broken.

Trying to delete the branch or checking out gives the following error:

? muve git:(develop) git push origin :feature-fix-honolulu-unit-tests 
error: unable to delete 'feature-fix-honolulu-unit-tests': remote ref does not exist
error: failed to push some refs to 'ssh://git@stash.amazondcl.com:8443/muve2/muve.git'

? muve git:(develop) git checkout -b feature-fix-honolulu-unit-tests
fatal: A branch named 'feature-fix-honolulu-unit-tests' already exists.

Solution

Quote from Bryan Turner (Atlassian Stash developer)

Most likely, since creating such a ref shouldn't be possible, you'll have to fix it directly on the filesystem. It appears (from your support zip; thanks for that) that the MUVE2/muve repository is at <tt>/mnt/stashDrive/data/repositories/336</tt>. Someone with filesystem access will need to check for the presence of <tt>/mnt/stashDrive/data/repositories/336/refs/heads/feature-fix-honolulu-unit-tests</tt> (a loose ref) and, if it's there, remove it. Whether the loose ref exists or not, they'll also need to look for a <tt>refs/heads/feature-fix-honolulu-unit-tests</tt> line in<tt>/mnt/stashDrive/data/repositories/336/packed-refs</tt> and remove that if present.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

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&nbsp...

649 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot