'origin' does not appear to be a git repository 에러 (git)

강민지·2023년 6월 11일

새로운 레포지토리를 생성 후 첫 push를 하려는데, origin이 존재하지 않는다고 한다.

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 rights
and the repository exists.

git remote remove origin으로 뭔가 남아있지 않을까 싶어 확인 후 origin 저장소 연결을 끊으려고 했더니 아예 origin 자체가 없어서 지울 origin 저장소가 없다 함.

✅ 원인

아마 레포지터리 생성 후 연결 과정에서 문제가 생긴 듯

✅ 해결방법

=> 그냥 다시 재연결 시켜 주면 됨.

git remote add origin [레포지토리 주소]

다시 origin 저장소를 연결해주고 git remote -v로 확인해보면 origin 저장소가 잘 연결 됨.

profile
화날 때 올림

0개의 댓글