Git remote和GIT_SSL_NO_VERIFY [英] Git remote and GIT_SSL_NO_VERIFY

查看:913
本文介绍了Git remote和GIT_SSL_NO_VERIFY的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我拥有使用SSH验证的存储库,但也有克隆方法的第二个存储库(GIT_SSL_NO_VERIFY = true git clone git-address)。

如何添加第二个存储库(git remote add ...)?

解决方案

您可以做的一件事是在命令前加上 GIT_SSL_NO_VERIFY = true ,例如:

  GIT_SSL_NO_VERIFY = true git remote add 

而且,每当您需要使用该远程服务器时,例如每当您执行克隆,获取或拉出时,

另一种解决方案是导出变量:

  export GIT_SSL_NO_VERIFY = true 

这种方法适用于所有命令,不需要加上前缀。这也是它的缺点,因为它也会应用于所有其他Git仓库。



最好的解决方案是设置 http.sslVerify 将repo的值设置为false,如下所示:

  git config http.sslVerifyfalse


I have repository with SSH verification, but also I have second repository with clone method (GIT_SSL_NO_VERIFY=true git clone git-address).

How I can add second repository (git remote add ...)?

解决方案

One thing you can do is prefix your command with GIT_SSL_NO_VERIFY=true, for example:

GIT_SSL_NO_VERIFY=true git remote add

And, every time you need to work with that remote, for example whenever you do a clone, fetch, or pull, you will have to prefix them like that.

Another solution is to export the variable:

export GIT_SSL_NO_VERIFY=true

This way it will apply to all commands, no need to prefix it. That's also its drawback, as it will be applied for all other Git repos as well.

The best solution is to set the http.sslVerify config value of the repo to false, like this:

git config http.sslVerify "false"

这篇关于Git remote和GIT_SSL_NO_VERIFY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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