Repository/Project deletion failed and unable to add new users/groups in repositories

NMohan August 19, 2014

I have installed stash 3.2 and added the evaluation license for testing purpose. i created a project and created the repository. I was testing the various functionalities by deleting a repository and project which failed. I tried to add group to repo which also failed. seeing the below in log

2014-08-20 11:09:09,490 INFO [http-bio-17993 exec-2] admin @L9VJK8x669x260x0 gnwktx 10.178.23.278 "GET /projects/MON/repos/testing/settings HTTP/1.1" c.a.s.i.w.a.RepositoryAdminController Failed to resolve default branch. Cause: refs/heads/master is set as the default branch, but this branch does not exist

2014-08-20 11:18:04,549 INFO [http-bio-17993-exec-4] admin @L9VJK8x678x404x0 gnwktx 10.178.23.278 "GET /projects/MON/repos/testing/settings HTTP/1.1" c.a.s.i.w.a.RepositoryAdminController Failed to resolve default branch. Cause: refs/heads/master is set as the default branch, but this branch does not exist

i get the below pop up while trying to add group(permission) for a particular repo

Something went wrong while trying to serve your request. Try reloading the page.

2 answers

1 accepted

0 votes
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 12, 2018

Hi,

The log confirms that the default branch does not exist.

c.a.s.i.w.a.RepositoryAdminController Failed to resolve default branch. Cause: refs/heads/master is set as the default branch, but this branch does not exist

In this example, the default branch has been set to be "master".

 

Troubleshooting

The following git commands can be used to confirm if the branch is available in a local clone of the repository and/or on Bitbucket Server:

# Retrieving only local branches
git branch
# Retrieving all remote branches
git branch -r

Identify who deleted the branch and restore it

If the branch existed previously and you suspect that it has been deleted, you can follow the instructions on the How to identify a deleted branch to confirm that and identify the user who deleted the branch. Note that this only applies to branches deleted via Git commands and not via the User interface.

We can still detect if a branch was deleted via the user interface if the audit log was set to LOW.

Once the deleted branches have been identified, it can be restored by following the instructions on the How to restore a deleted branch.

 

Cheers,

Caterina - Atlassian

0 votes
ThiagoBomfim
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 27, 2014

Hi NMohan

In the repository settings you can choose which branch should be the default one. Apparently you have the master branch selected but it doesn't exist. Something is inconsistent.

Would you be able to try to select a valid branch and attempt to delete the repo again?

If that doesn't work, I advise you to raise a support issue with us so we can investigate further.

Best regards,

Thiago Bomfim

Atlassian Support

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events