에러메세지

1
2
error: src refspec main does not match any
error: 레퍼런스를 'https://192.168.0.77:9000/example'에 푸시하는데 실패했습니다

원인

Git remote 설정했던 repository의 URL의 IP 주소가 변경이 되었다.
그래서 원래의 IP에 접근할 수 없는 것. (해당 주소가 없음)

해결

(1) remote 연결정보(URL)를 변경해준다.
혹은
(2) remote 연결정보를 삭제 후 재연결한다.

1
2
3
(1) remote 연결정보(URL)를 변경해준다.

git remote set-url [alias] [새로운URL]
1
2
3
4
(2) remote 연결정보를 삭제 후 재연결한다.

git remote remove [alias]
git remote add [alias] [새로운URL]

alias
remote repository를 지칭하는 별칭

Reference

https://2vup.com/git-push-error/
https://cheershennah.tistory.com/217