Today I Learned

Debugging git push(ssh) hanging

Sometimes when we try to push some changes to the repository git push can hang and we cannot get any meaningful information. We can check the GitHub status page but when everything is green there what can we do to get more information(applies only for ssh)

1) Create script like ~/sshv.sh

#!/bin/bash
ssh -vvv "$@"

2) Add permissions chmod u+x ~/sshv.sh

3) Push to the repo GIT_SSH=~/sshv.sh git push <rest of your command>

We should see what exactly what ssh is doing.