You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I keep getting the error "Connection to bitbucket.org closed by remote host." because my git hooks take long to complete, is there a way to increase the connection timeout?
Could you please let us know
1. What operation gives you that error? Is it clone, pull or push?
2. What kind of hooks are you using, is it a client-side pre-push hook or something else?
3. How long approximately after you start the operation do you see it timing out?
4. What OS and SSH client are you using? I'm asking because SSH configuration is set differently depending on that.
Thanks for the info. I would suggest first checking the files /etc/ssh/ssh_config file (system-wide ssh configuration) and ~/.ssh/config (ssh configuration for your user) in your laptop, and see if there are any values set for ServerAliveInterval and ServerAliveCountMax (either for Host * or for Host bitbucket.org).
If you don't see these options in any of the two files, what you can do to keep the connection open for longer would be to add the following in either of the files:
The above values are just an example and you can adjust them depending on how long your hook needs to finish. What these settings will do is make your SSH client send a null packet to Bitbucket every 300 seconds (5 minutes) and give up if it doesn't receive a response after 2 tries. This will give you 10 minutes before the connection times out, if the hook takes longer to complete you can set a higher value to either or both of the options.
Please feel free to let me know how it goes and if you need anything further.