-
[GIT] fatal: unsafe repository ('~ㄱ경로' is owned by someone else)To add an exception for this directory, call:
2022. 11. 18.
git을 사용할 때 다음과 같은 에러가 발생할 수 있다
fatal: unsafe repository ('~ㄱ경로' is owned by someone else)To add an exception for this directory, call:
우선 git에서 발표한 보안 취약점 이슈에 대해 읽어보자
https://github.blog/2022-04-12-git-security-vulnerability-announced/
Git security vulnerability announced | The GitHub Blog
Upgrade your local installation of Git, especially if you are using Git for Windows, or you use Git on a multi-user machine.
github.blog
해결방법 1. git을 2.35.2 이상으로 업데이트한다
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt update
$ sudo apt install git해결방법 2. 명령어를 통해 해당 디렉토리를 안전한 디렉토리로 지정한다
$ git config --global --add safe.directory 디렉토리경로** GUI로 client로 fork를 사용하고 있다면 화면에 나와 있는 Mark repository as safe 버튼을 클릭해주기만 해도 된다.
** 만약 동일한 오류가 계속 반복된다면 Backslash(\) 대신 Slash(/)를 사용해 경로를 지정해볼 것.
'Programming > 에러노트' 카테고리의 다른 글
댓글