如何为所有子域设置Git配置选项? [英] How to set Git config options for all subdomains?

查看:135
本文介绍了如何为所有子域设置Git配置选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与您可以如何设置特定网址的Git配置选项类似,如



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



我想为他们设置所有子域名。我怎样才能使用通配符?以下内容似乎无效

git config http。https://*.mycompany.com/.sslCAInfo<下载证书> .pem

解决方案


如何使用通配符?

使用Git 2.13(2017年第2季度),您将可以使用通配符!



请参阅提交a272b9e commit af99049 提交3ec6e6e 提交3e6a0e6 commit 3343995 (2017年1月31日)by Patrick Steinhardt( pks-t

帮助: Junio C Hamano( gitster
(由 Junio C Hamano - gitster - 提交a411726 ,2017年2月27日)
$ b


urlmatch :允许URL主机部分的globbing h2>

http。< url>< variable>中的< url> 部分; 配置变量
现在可以与' * '作为通配符拼写。



例如 http.https://*.example.com.proxy 可用于指定用于 https:/的
代理/a.example.com
https://b.example.com 等等,即 example.com
域名。



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

解决方案

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.

这篇关于如何为所有子域设置Git配置选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆