fatal: detected dubious ownership in repository at ~

dev bourgeois·2024년 6월 1일

git

목록 보기
6/11
post-thumbnail

새 브랜치를 만드는데

git fetch origin
git checkout feature

다음과 같은 오류 발생

is owned by:
        'S-1-5-32-544'
but the current user is:
        'S-1-5-21-3003035046-2668303490-1917977511-1001'
To add an exception for this directory, call:

        git config --global --add safe.directory C:/Users/user/Pickle-FE
fatal: detected dubious ownership in repository at 

Git이 저장소 디렉토리의 소유권과 현재 사용자의 불일치를 감지하여 발생하는 문제로
이 보안 기능은 잠재적으로 안전하지 않은 작업을 방지하기 위해 설계되었다.
이를 해결하려면 Git 설정에 디렉토리를 안전한 디렉토리 목록에 명시적으로 추가하면 된다.


  1. 디렉토리를 안전한 디렉토리 목록에 추가
git config --global --add safe.directory C:/Users/user/Pickle-FE
  1. 확인
git config --global --get safe.directory

이 명령어를 실행하면 해당 레파지토리가 저장된 경로가 목록에 나와야 된다.

  1. 이전에 시도하던 Git 명령어 시도
git fetch origin
git checkout feature

해결완~

0개의 댓글