我如何仅为特定回购设置GIT_SSL_NO_VERIFY? [英] How do I set GIT_SSL_NO_VERIFY for specific repos only?

查看:291
本文介绍了我如何仅为特定回购设置GIT_SSL_NO_VERIFY?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用没有适当证书的git服务器,但我不想做必要的操作。

I have to use a git server without proper certificates, but I don't want to have to do

env GIT_SSL_NO_VERIFY=true git command

每一次我做一个git操作。但我也想为其他git存储库启用SSL。有没有办法让这个本地到一个单一的回购?

every single time I do a git operation. But I would also like to leave SSL enabled for other git repositories. Is there a way to make this local to a single repo?

推荐答案

您可以做

You can do

git config http.sslVerify false

在您的特定回购协议中,仅针对该回购协议停用SSL证书检查。

in your specific repo to disable SSL certificate checking for that repo only.

如果您还没有git repo,那么您可以修改全局配置

In case you don't have a git repo yet then you can modify the global config

git config --global http.sslVerify false

这篇关于我如何仅为特定回购设置GIT_SSL_NO_VERIFY?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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