简体   繁体   English

通过HTTP Git作为传输协议

[英]Git over HTTP(s) as a transfer protocol

I was looking at the git documentation here and it mentions that git supports HTTP(s). 我在这里查看git文档,它提到git支持HTTP。 I'm curious about whether git does any kind of certificate validation when pushing/cloning codebases over HTTPS. 我很好奇git在通过HTTPS推送/克隆代码库时是否进行任何形式的证书验证。 If so, could someone point me to the code snippet where this happens? 如果是这样,有人可以将我指向发生这种情况的代码段吗?

Yes, the git client does perform certificate validation. 是的,git客户端确实执行证书验证。 You can disable validation using this command: 您可以使用以下命令禁用验证:

git config ––global http.sslVerify false

Try checking the http.sslVerify documentation. 尝试查看http.sslVerify文档。

Check here for where it's called. 在这里检查它的调用位置。

You can find the following defined here: http://git-scm.com/docs/git-config 您可以在此处找到以下定义: http : //git-scm.com/docs/git-config

http.sslVerify http.sslVerify
Whether to verify the SSL certificate when fetching or pushing over HTTPS. 在获取或通过HTTPS推送时是否验证SSL证书。 Can be overridden by the GIT_SSL_NO_VERIFY environment variable. 可以被GIT_SSL_NO_VERIFY环境变量覆盖。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM