git through SOCKS proxy won't respond after a while

时间:2017-08-13 13:56:35

标签: git proxy socks

I'm using a SOCKS proxy to push changes to a repo only allowed from a specific IP, the command I use is 'ssh -D port -f -C -q -N user@xxx.xxx.xx.xx' and everything works ok, but after some time when I try to pull or push this is the error that returns: Failed to receive SOCKS5 connect request ack. However I use this same proxy for Firefox and it never stops working.

Any idea why this is happening and how to solve it?

1 个答案:

答案 0 :(得分:0)

我认为您尝试连接到Github的企业版。我建议调试此连接。请使用类似的命令 ssh -D port -v -N user@xxx.xxx.xx.xx。当您尝试连接时,您将在控制台中获得调试消息。例如:

channel 2: open failed: connect failed: Operation timed out
debug1: channel 2: free: direct-tcpip: listening port 9100 for xx.xx.xx.xx port 443, connect from 127.0.0.1 port 44848 to 127.0.0.1 port 9100, nchannels 3

第一条消息是错误Failed to receive SOCKS5 connect request ack.。第二个是成功连接。