Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Git config options for all subdomains?

Tags:

git

github

ssl

Similar to how you can set Git config options for a specific URL like

git config http."https://code.example.com/".sslVerify false

I'd like to set them for all subdomains. How can I use wildcards? The following doesn't seem to work

git config http."https://*.mycompany.com/".sslCAInfo <downloaded certificate>.pem

like image 830
bbodenmiller Avatar asked Feb 05 '23 22:02

bbodenmiller


1 Answers

How can I use wildcards?

With Git 2.13 (Q2 2017), you will be able to use wildcards!

See commit a272b9e, commit af99049, commit 3ec6e6e, commit 3e6a0e6, commit 3343995 (31 Jan 2017) by Patrick Steinhardt (pks-t).
Helped-by: Junio C Hamano (gitster).
(Merged by Junio C Hamano -- gitster -- in commit a411726, 27 Feb 2017)

urlmatch: allow globbing for the URL host part

The <url> part in "http.<url>.<variable>" configuration variable can now be spelled with '*' that serves as wildcard.

E.g. "http.https://*.example.com.proxy" can be used to specify the proxy used for https://a.example.com, https://b.example.com, etc., i.e. any host in the example.com domain.

like image 68
VonC Avatar answered Feb 08 '23 16:02

VonC