git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git ls-remote: specifying connect timeout / retry limit
@ 2019-01-22  8:49 Tim Heckman
  0 siblings, 0 replies; only message in thread
From: Tim Heckman @ 2019-01-22  8:49 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-22  8:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22  8:49 git ls-remote: specifying connect timeout / retry limit Tim Heckman

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).