Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git (SSH) hangs during clone/push/pull

Whenever I try and perform an operation using git (e.g. clone, pull, or push) over SSH the git client seems to hang and time out indefinitely (I've left it running for half an hour to no avail). I have my SSH keys loaded (using BitBucket). I am able to perform anything I need via HTTPS, and SSH is the only thing that appears to break.

Here is some console output from an attempted pull

$ GIT_TRACE=1 git pull
16:44:05.679911 git.c:344               trace: built-in: git 'pull'
16:44:05.681453 run-command.c:334       trace: run_command: 'fetch' '--update-head-ok'
16:44:05.686650 exec_cmd.c:120          trace: exec: 'git' 'fetch' '--update-head-ok'
16:44:05.697849 git.c:344               trace: built-in: git 'fetch' '--update-head-ok'
16:44:05.703211 run-command.c:334       trace: run_command: 'ssh' '-p' '7999' '[email protected]' 'git-upload-pack '\''/ei/myProject.git'\'''

Anyone have any idea what could be happening?

like image 700
Clay Benson Avatar asked Feb 14 '26 02:02

Clay Benson


1 Answers

7999 is a non-standard port which is likely to be blocked.

If port 22 is not blocked (and that is a big if), then you can consider an ssh tunneling:

ssh -R 7999:localhost:22  [email protected] 
like image 128
VonC Avatar answered Feb 16 '26 14:02

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!