Git

[Git] fatal: couldn't find remote ref ~~ fatal: the remote end hung up unexpectedly 원인 / 해결 방법

jimmy_AI 2024. 2. 19. 23:13
반응형

개요

git pull 과정에서 다음과 같은 형태의 오류 메시지가 발생하며,

pull 진행이 불가능 하였습니다.

########################### W A R N I N G ############################

This equipment is privately owned.
All access to this equipment is logged.
Disconnect IMMEDIATELY, if you are not an authorized user
Violators will be prosecuted to the fullest extent of the law.

######################################################################
fatal: couldn't find remote ref feature/1
(base) root@-w:~/my_project# fatal: the remote end hung up unexpectedly
remote:
remote: ========================================================================
remote:
remote: rpc error: code = Canceled desc = running upload-pack: user canceled the request
remote:
remote: ========================================================================
remote:

위과 같이 fatal: couldn't find remote ref, 

fatal: the remote end hung up unexpectedly,

rpc error: code = Canceled desc = running upload-pack: user canceled the request

등의 메시지가 출력되는 형태로 원인 파악이 한 번에 쉽게 되지는 않았습니다.

 

 

원인 및 해결법

원인은 비교적 간단한 이유였습니다. 바로 A 레포지터리feature/1 브랜치를 상대로

pull을 진행해야 했는데, 엉뚱한 레포인 B 레포지터리feature/1 브랜치를 상대로 pull을

시도했기 때문입니다. B 레포에는 feature/1라는 이름의 브랜치가 존재하지 않았습니다.

 

아마도, pull을 시도하려는 브랜치 이름에 오타가 있거나, 

레포지터리를 착각한 경우 등에서 같은 현상이 발생할 수 있는 것으로 추측됩니다.

레포와 브랜치 이름을 정확히 맞춘 뒤, pull을 시도해주시면 해당 현상은 해결될 것입니다.