Windows/유용한 풀그림

[git] Total 이후 push 실패 (client_loop: send disconnect: Broken pipe)

채윤아빠 2023. 11. 23. 20:18
728x90
반응형

문제점 및 증상

이전 "[linux] ssh SSH2_MSG_KEX_ECDH_REPLY 에서 멈추는 문제" 글을 통하여 저장소 복제는 문제는 해결이 되었는데, 소스를 수정한 이후에 push 하면 다음과 같이 "Total ..."이 나온 후 한참을 멈춰있다가 "client_loop: send disconnect: Broken pipe" 문제가 발생하며 push가 실패하였습니다.

nvidia@nvidia-OrinNX16G:~/my_prj$ git push -vvv
Pushing to ssh://git@my.hanwh.net/nodejs/my_prj
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 4 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 12.13 KiB4.04 MiB/s, done.
Total 4 (delta 1), reused 0 (delta 0)
client_loop: send disconnect: Broken pipe
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly

ssh 관련 문제로 보여 이것 저것 확인해 보았으나, push가 매번 실패했습니다.


해결 방안

결국은 "ssh" 대신 "https"로 변경하기로 하고, CUI 환경에서 다음과 같이 설정하여 주었습니다.

nvidia@nvidia-OrinNX16G:~/my_prj$ git config credential.helper 'cache ==timeout=3600'
nvidia@nvidia-OrinNX16G:~/my_prj$ git config credential.helper store

그리고 저장소 주소를 "ssh" 대신 "https" 형식으로 변경 하였습니다.

nvidia@nvidia-OrinNX16G:~/my_prj$ git remote set-url origin https://my.hanwh.net/nodejs/my_prj.git
nvidia@nvidia-OrinNX16G:~/my_prj$ git remote -v
origin  https://my.hanwh.net/nodejs/my_prj.git (fetch)
origin  https://my.hanwh.net/nodejs/my_prj.git (push)

이후 push 할 때, 계정 및 비밀번호 정보를 올바로 입력하면 정상적으로 수해오디는 것을 확인할 수 있었습니다.

nvidia@nvidia-OrinNX16G:~/my_prj$ git push
Username for 'https://my.hanwh.net': hanwh
Password for 'https://hanwh@my.hanwh.net':
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 4 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 12.13 KiB12.13 MiB/s, done.
Total 4 (delta 1), reused 3 (delta 0)
remote:
remote: To create a merge request for 17683, visit:
remote:   http://my.hanwh.net/nodejs/my_prj/-/merge_requests/new?merge_request%5Bsource_branch%5D=17683
remote:
To https://my.hanwh.net/nodejs/my_prj.git
   fb690f7..37d8f28  17683 -> 17683

참고자료