git) detected dubious ownership in repository

2023. 5. 22. 21:39Trouble shooting

git 계정을 공부용과 프로젝트 용을 분리해서 사용하려고 하였는데,

 

리포지토리 폴더가 소유권에 불일치가 있다고 오류가 떴다.

 

$ git status
fatal: detected dubious ownership in repository at 'C:/Users/park/Documents/Dev/알고리즘 공부'
'C:/Users/park/Documents/Dev/알고리즘 공부' is owned by:
        'S-1-5-32-544'
but the current user is:
        'S-1-5-21-1783517126-3184781375-1720212297-1001'
To add an exception for this directory, call:

        git config --global --add safe.directory 'C:/Users/park/Documents/Dev/알고리즘 공부'

 

해결방법

명령줄에서 'git config --global --add safe.directory '경로''를 

호출하여 이 디렉터리에 대한 예외를 추가할 수 있다. 

그러면 해당 디렉터리에서 계속 작업할 수 있다!

 

 

 

 

728x90