소스 가져오기
|
1 2 3 4 5 |
cd gitsource git clone ssh://git@192.168.0.1:22/data/git/xslt |
if. 소유권 오류
|
1 2 3 4 5 6 7 8 9 10 11 |
$ git add . fatal: detected dubious ownership in repository at 'D:/gitsource/xslt' 'D:/gitsource/xslt' is owned by: BUILTIN/Administrators (S-1-5-12-544) but the current user is: JAM/jsc01 (S-1-5-21-22323223-258825918-2448035788-500) To add an exception for this directory, call: git config --global --add safe.directory D:/gitsource/xslt |
해결 방법
fatal: detected dubious ownership in repository at ‘D:/gitsource/xslt’
이 오류는 Git 2.35 이상에서 추가된 보안 기능(CVE-2022-24765) 때문입니다.
에러는 Git이 해당 디렉토리의 소유권이 의심된다고 판단할 때 발생하는 에러입니다. 이는 일반적으로 디렉토리의 소유자와 Git을 실행하는 사용자가 일치하지 않거나, 시스템의 보안 설정으로 인해 발생할 수 있습니다.
이 문제를 해결하는 방법은 다음과 같습니다:
Git의 신뢰할 수 있는 디렉토리 목록에 추가:
- Git의 보안 설정을 변경하여 해당 디렉토리를 신뢰할 수 있는 디렉토리로 추가할 수 있습니다. 이를 위해 다음 명령어를 사용하세요:
|
1 2 3 |
git config --global --add safe.directory 'D:/gitsource/xslt' |
