오늘의 개발

SSH fatal: Could not read from remote repository. 오류 해결하기

유토냥이 2023. 8. 20. 16:18

매번 까먹어서 적어놓고 복붙하기

SSH 설정해놓고 아래 메시지 뜨면 다음과 같은 명령어 입력

(사전에 SSH 생성 및 등록되어있어야 함.)

 

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

 

SSH 에이전트 시작

eval $(ssh-agent -s)

 

SSH 키 입력

ssh-add ~/.ssh/id_rsa

id_rsa는 이전에 키 이름 뭐로 저장했냐에 따라 다름