Thursday, November 01, 2018

Git won't Pull

Problem: cannot connect to remote

$ git pull
nc: getaddrinfo: nodename nor servname provided, or not known
ssh_exchange_identification: Connection closed by remote host

fatal: Could not read from remote repository.

$ git remote -v
origin git@github.com:blah/blah (fetch)

origin git@github.com:blah/blah (push)

$ cat .git/config
...
sshCommand = ssh -o 'ProxyCommand=nc -X connect -x blah:80 %h %p'
...

Aha!

Possible solution: remove sshCommand line from .git/config unless you are ALWAYS connecting through the proxy server.

No comments: