오늘도 한 뼘 더

[Git] Error : fatal: detected dubious ownership in repository 본문

Study/Git

[Git] Error : fatal: detected dubious ownership in repository

나른한댕댕이🐶 2023. 12. 12. 15:20
728x90
반응형

  # 배경  

작업 중인 디렉터리에서 git을 사용하려고 하는데 에러가 발생했다. 

 

  # 문제  

git status 명령어를 실행시키는데 다음과 같은 에러가 나타났다.

$ git status
> fatal: detected dubious ownership in repository at

 

위의 문제는 Git의 보안 이슈로 인해서 해당 경로가 차단돼서 나타나는 문제라고 한다.

 

  # 해결 방법  

다음 명령어를 통해서 해당 경로를 안전 경로로 등록을 해주면 된다. 

$ git config --global --add safe.directory [directory path]
728x90
반응형
Comments