detected dubious ownership in repository

Eicke Felipe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 13, 2023

After upgrading bitbucket from 7 to 8.8.2 we are seeing the following error:

git cat-file -t refs/heads/master:' exited with code 128 saying: fatal: detected dubious ownership in repository at '/data/repositories/1' To add an exception for this directory, call: git config --global --add safe.directory /data/repositories/1

 

We still see the error even after adding the safe.directory.

 

# git config --global --list
safe.directory=/data/repositories/1
safe.directory=*

1 answer

1 accepted

1 vote
Answer accepted
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2023

Hi,

Probably the /data/repositories/1 directory has a different owner than the user that Bitbucket Server is running with. You need to ensure all directories under /data/repositories have an owner that matches the user Bitbucket Server is running as.

Cheers,

Christian
Premier Support Engineer
Atlassian

Eicke Felipe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 15, 2023

Thank you! We fixed that exactly as you described.

venkatesh vp August 14, 2023

Thank you! changing the ownership of the repo folder with instance owner fixed the issue. The error on the UI was misguiding and your solution fixed the issue that I had.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events