【🧰 SW Info & Tips】/Git│SVN

Could not open repository libgit2 returned: repository path ... is not owned by current user.

[一日一學, 一日一新] 2025. 12. 7.

한 PC의 소스폴더들이 있는 디스크를 다른 PC로 옮겼는데

OS 유저가 변경되어 올바른 git 레포지토리가 제목과 같이 오류를 내는 경우가 있다.

 

아래와 같이 해결 할 수 있다.

 

Git Bash를 실행해서 해당 폴더로 이동해서, git status 를 입력하면

$ git status
fatal: detected dubious ownership in repository at 'F:/Workspace/TIL'
'F:/Workspace/TIL' is on a file system that does not record ownership
To add an exception for this directory, call:

git config --global --add safe.directory F:/Workspace/TIL

 

로컬 레포지토리 현재 상황이 나오고, 아래 config 명령어를 통해 해결하라고 알려준다.

그대로 입력하면 문제가 해결된다.

 

반응형

댓글