Cannot connect to gitlab

I want to pull the newest update on my gitlab, I hit git pull origin master, it returns connection reset by port 22, i keep trying to do

eval ssh-agent then ssh-add ~/.ssh/ and hit ssh -T git@gitlab.com but still get Connection reset by 172.65.251.78 port 22

1 answer

  • answered 2021-05-17 07:09 VonC

    If even ssh -T git@gitlab.com does not work (does not return a Welcome message), then maybe your network environment does not allow SSH.

    Generally, ingress SSH is forbidden in a corporate setting, but SSH URL for cloning should still work!

    Also, ssh-agent is only needed if your private key is passphrase-protected (and therefore encrypted). Try first with a passphrase-less key, to see if it makes any difference.

    Check also your permissions in your ~/.ssh folder (as seen here), in case they are too opened.
    Check if adding -o TCPKeepAlive=true could help.