Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

500 Error trying to access Bitbucket repository

Lee Roder June 4, 2020

I am getting the following error on two of our repos for client (Project):

'/usr/bin/git cat-file -t refs/heads/master:' exited with code 128 saying: warning: ignoring broken ref refs/heads/master. fatal: Not a valid object name refs/heads/master:

Please see your system administrator.

 

I have created new equivalent repos under the same project from a local clone I had, but would like to remove these offending repos.  Unfortunately, cannot remove them via the Bitbucket web ui since one must be able to 'open' a repo in order to get to the 'delete' option.  How can I make these repos disappear from the Project they are under?

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2020

Hello @Lee Roder ,

Thanks for reaching out and the error you are encountering looks like the same one mentioned int he following KB article that includes the steps to fix the issue. 

Please check this out and let us know if this is the case:

Regards,
Earl

Lee Roder June 5, 2020

@Earl McCutcheon 

Earl,

Thanks!   Unfortunately, that doesn't help me.   My problem is that I cannot click into the repository, therefore I cannot get to 'repository settings' for the two repositories in question.  I am getting that 500 error from the Project web page that these repos are in as soon as I click on either project.   I hope this makes sense.   I am not able to get in to either repository, and that is where the article you referenced is operating from.

Help!

Miguel Alonso
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2020

@Lee Roder ,

Thanks for the info. The error itself tells us that the master branch reference in disk is corrupted. Even if you don't have access to the repo it should be possible to get the repository ID directly on the database by running the query on this KB

Once you identify the repository, can you access it on disk by following the instructions provided in the KB by my colleague @Earl McCutcheon Then access the file refs/heads/master within the affected repository in disk. Can you check if the file exists and provide us with the content? It should be a text file with a commit id in it.

Like # people like this
Lee Roder July 22, 2020

Miguel,

Apologies for the lengthy delay prior to responding!  I did read that KB posting but my issue is that we did not ever set up a database (bad form, I know!).  After some deliberation, I determined that the best way forward might be to navigate to /var/atlassian/application-data/bitbucket/shared/data/repositories and do a bit of investigating.  I determined that there were several subfolders simply given numerical names.  I then determined that within each folder is a file called repository-config which, among other things, contains a project = ... entry that corresponds to our repository names.   I found one with the project name in question, navigated to refs/heads within that folder, and found that the file master is empty.   As in, a zero byte file.   Hope this helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.2.3
TAGS
AUG Leaders

Atlassian Community Events