I have a script running git clone / pull automatically (this actually happens inside jenkins CI, but my question is more general). The remote git server is based on HTTPS. The device with the git client has a weak DSL Internet connection, so it sometimes restores and changes the IP address, losing all existing connections. When the connection fails while the git client is running, the client never succeeds, but it does not interrupt with a timeout, so my script freezes.
I would like to configure the client so that it stops working after some period (therefore, the script can try again, or register a failure, or take any other action). But I did not find any timeout option in the git -config man page. I found a related question , but this is only for SSH connections. Do you know if there is an alternative for http servers?
Daniel F. Moisset
source share