Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
522 views
in Technique[技术] by (71.8m points)

Trying to git clone via SSH but getting broken pipe error

I am having some strange issues trying to git clone one of my public GitHub repositories because of a weird issue. I know it's not an issue with my key, because I've taken the same key from another VM and just simply fixed its permissions. This is the error that I get when trying to use SSH:

[root:kali:~/scripts]# ssh -T [email protected]_write_wait:
Connection to 192.30.253.112 port 22: Broken pipe

Suggestion 1

Reference: https://gitlab.com/gitlab-com/support-forum/issues/129

Tried to add the following to an /etc/ssh/ssh_config file:

Host *
ServerAliveInterval 120
TCPKeepAlive no

and no luck. I've even tried changing TCPKeepAlive to yes, and the same thing happens.

My DNS server is set to 8.8.8.8, so not quite sure that's the issue. I can git clone the http URL, just not the SSH URL.

Suggestion 2

I also tried to run the ssh command with the verbose option, and according to the output, it looks like it actually authenticates successfully, as shown below:

debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to github.com ([192.30.253.113]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = C.UTF-8
debug1: Sending env LC_CTYPE = C.UTF-8
packet_write_wait: Connection to 192.30.253.113 port 22: Broken pipe

Any idea what else could be going wrong here?

question from:https://stackoverflow.com/questions/52415943/trying-to-git-clone-via-ssh-but-getting-broken-pipe-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I don't know who this guy is, but bless him! This worked for me: https://blog.bchoy.me/post/2018-09-11-vmware-ssh-bug/

Put this in your ~/.ssh/config

Host *
   ServerAliveInterval 600
   TCPKeepAlive yes
   IPQoS=throughput

He has a link to some discussion about the IPQoS parameter -- which fixed it for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...