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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Exited with code 128 saying: fatal: unsafe repository

Hi There

I have 3 repositories on Bitbucket that are showing the bellow error with a 500 skull and cross bones at the top. Has anyone seen this before and know how to resolve it?

'C:\Program Files\Git\cmd\git.exe cat-file -t refs/heads/master:' exited with code 128 saying: fatal: unsafe repository ('C:/Atlassian/ApplicationData/bitbucket/shared/data/repositories/96' is owned by someone else) To add an exception for this directory, call: git config --global --add C:/Atlassian/ApplicationData/bitbucket/shared/data/repositories/96

2 answers

1 accepted

1 vote
Answer accepted

Got this sorted with the help of a support tech. 

The fix for this issue is to ensure the Bitbucket User running the bitbucket service owns the <BITBUCKET_HOME>/shared directory. (make sure the permissions run all the way down the folder path)

I'm suddenly having this issue too. Where's this directory?

0 votes
Mikael Sandberg Community Leader Apr 19, 2022

Hi @Tristan Williams,

Welcome to Atlassian Community!

The error indicate that you are not the owner of the directory that is being tracked by Git, and that is why you get the error message. Basically Git will by default not parse a Git config directory owned by someone else then the current user. You can learn more about the option here

Hi @Mikael Sandberg  I am also having the same issue , here we are using our own image in bitbucket pipelines. all our images are working fine and I recently updated one image, when we are running the Dockerfile will use command to get  the zip file from our repository downloads. when I am using this image seeing the above error what @Tristan Williams  is having.error.PNG

@Sumanth Anumolu - you find a solution?  I also am using my own images, and today I created a new image and it's getting these weird git errors..  my older images which are practically the same don't have this issue

Suggest an answer

Log in or Sign up to answer