Tips
[Git] Please make sure you have the correct access rightsand the repository exists.
ifhead
2022. 8. 24. 17:20
반응형
문제 상황
PC에 새로운 폴더를 만들고 이미 존재하는 원격 레포지토리를 pull 해올 때 다음과 같은 에러가 발생합니다.
이 문제는 다양한 이유로 발생하는데요.
브랜치를 이동하려고 하는데 원격 저장소의 브랜치를 읽을 수 없거나
원격 저장소와 통신할 때 흔히 발생하는 에러입니다.
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rightsand the repository exists.
해결 방법 1
HTTPS 인증하기
git remote set-url origin https://github.com/username/repository.git
SSH 인증하기
git remote set-url origin git@github.com:username/repository.git
해결 방법 2
위 방법으로 해결되지 않는다면 레파지토리 연결 상태를 확인하고 재연결해주세요.
git remote -v
git remote remove origin
git remote add origin *원격 리파지토리의 HTTP or SSH*
git pull origin master
반응형