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
Next: Root
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?
Hi Paulo,
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.
Kind regards,
Theodora
Hi,
Here are the answers:
1 - It's a push.
2 - Yes, a client side pre-push hook.
3 - Around 3-4 minutes.
4 - Mac OS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paulo,
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:
Host bitbucket.org
ServerAliveInterval 300
ServerAliveCountMax 2
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.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.