git ls-remote: specifying connect timeout / retry limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I've hit a particular situation where I've ran a `git ls-remote`
command against a remote Bitbucket repository that resulted in the
command hanging for a pretty long amount of time. Running strace shows
that the TCP connect call eventually times out, and `git ls-remote`
uses a default timeout period meaning it takes awhile to notice. If it
retries different IPs, and they all fail, it can take many minutes for
"git ls-remote" to return.

Is there a mechanism by which I can configure the connection timeout
and retry count to have the `git ls-remote` command fail much faster?
For my case I'd like a 15 second timeout and limiting retries to 2. Of
course I plan on wrapping the command in a deadline itself, but I'd
rather give it a bit more time to pull data if I'm on a slow/latent
connection yet it was able to make the initial connection.

Digging through the manpage there's nothing jumping out at me at how
to solve this so I thought I'd reach out here.

Cheers!
-Tim



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux