에러

git push error : fatal: 'origin' does not appear to be a git repository ...

integerJI 2020. 9. 17. 23:06

노트북 여러대로 커밋을 하다 보니 (주기적 포멧도 진행) 해당 오류가 너무 많이나와 글로 남깁니다.

 

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.

 

테스트 케이스 : pull 혹은 push 하며 발생

 

발생 원인 : 원인은 2대의 노트북으로 돌아가며 push와 pull을 하다 보니 생긴 오류로 추정

 

해결 방안 :

 

1. git remote -v 를 통하여 remote가 정상적으로 연결되어있는지 확인

 

git remote -v

 

저장되어있는 원격 저장소가 없다.. -> 2번으로 이동

 

저장되어있는 원격 저장소가 존재한다 -> 2.1번으로 이동

 

2. 다시 연결

 

git remote add origin "자신의 github 주소"

 

remote add를 통하여 자신의 guthub의 주소를 입력한다.

 

git remote -v 를 사용하여 잘 연결되었는지 확인.

 

2-1 원격 저장소 삭제

 

( 사진 없음 )

 

git remote remove origin

 

-> 2번으로 이동 후 remote add 사용