Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot connect to gitlab

Tags:

git

ssh

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 [email protected] but still get Connection reset by 172.65.251.78 port 22

like image 413
Never Land Avatar asked Jun 14 '26 23:06

Never Land


1 Answers

If even ssh -T [email protected] 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.

like image 67
VonC Avatar answered Jun 17 '26 13:06

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!