본문 바로가기
프로그래밍이야기/Git

[Git] ERROR fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository.

by 사랑꾼이야 2020. 11. 12.
반응형

 

 

수정된 소스를 원격저장소로 밀어넣기 위해서 다음과 같은 명령어를 실행하였습니다.

git push -u origin master

 

하지만 아래와 같은 메세지를 받게 되었습니다.

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

 

원인 파악.

 

영어 내용을 보아하니, Repository를 못 찾는다는 내용이며, 

 

원인은 다음과 같이 2가지의 경우로 볼 수 있습니다.

 

1. 원격저장소 연결의 문제가 있는 경우

  • 저장소 연결 확인
  • 연결된 주소 해제
  • 주소 재연결
 

2. 원격저장소 연결이 되어 있지 않는 경우

  • 저장소 연결 확인
  • 저장소 생성
  • 저장소 생성하는 부분은 아래 URL 참고

 

해결.

 

여기서는 원격저장소 연결의 문제가 있는 경우에 대해서 알아보도록 하겠습니다.

다음 순서대로 진행 시 

 

1. 저장소 연결 확인

git remote -v

origin  https://github.com/codeleesh/repo-create-test.git (fetch)
origin  https://github.com/codeleesh/repo-create-test.git (push) 

 

2. 연결된 주소 해제

git remote remove origin

 

3. 주소 재연결

git remote add origin git https://github.com/codeleesh/repo-create-test.git

 

 

반응형

댓글