gpt4 book ai didi

git submodule add + 不工作 + 获取 ssl 服务器问题

转载 作者:行者123 更新时间:2023-12-04 22:43:47 27 4
gpt4 key购买 nike

我正在尝试添加一个子模块 myapp给我的admin目录,其中两个是 gits。但我不断收到SSL certificate problem .我已经完成了git config http.sslVerify false尝试让它工作(但我不完全确定为什么这会有所帮助,当我想推送到大师 git push -u origin master 时它起作用了)。 有任何想法吗?

$ pwd
/c/Users/UserName/dir/admin
$ git submodule add ../myapp/
Cloning into 'myapp'...
fatal: unable to access 'https://myserver.com/gogs/user1/myapp/': SSL certificate problem: unable to get local issuer certificate
Clone of 'https://myserver.com/gogs/user1/myapp' into submodule path 'myapp' failed
$ git config --list |grep ssl
http.sslverify=false
$

编辑1

使用 ssh 在类似的环境中再次尝试但我的访问权限有问题。 有任何想法吗?
$ git submodule add ssh:../../lte_data_day_summary/
Cloning into 'sceal/lte_data_day_summary'...
ssh: Could not resolve hostname ssh: Temporary failure in name resolution
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of 'ssh:../../lte_data_day_summary/' into submodule path 'sceal/lte_data_day_summary' failed
$ pwd
/c/Users/User Name/dir1/dir2/sceal

EDIT2 - 给自己的笔记

全局配置
$ git config --global --list
user.email=you@example.com
http.sslverify=false

本地配置——为什么有 2 个?这是本地的还是全局的?
$ git config --list | grep ssl
http.sslverify=false
http.sslverify=false

最佳答案

这可能是原因:[PATCH] submodule: stop sanitizing config options - Jeff King


The point of having a whitelist of command-line config
options to pass to submodules was two-fold:

1. It prevented obvious nonsense like using core.worktree
for multiple repos.

2. It could prevent surprise when the user did not mean
for the options to leak to the submodules (e.g.,
http.sslverify=false).

For case 1, the answer is mostly "if it hurts, don't do
that". For case 2, we can note that any such example has a
matching inverted surprise (e.g., a user who meant
http.sslverify=true to apply everywhere, but it didn't).

可能会删除配置,以避免将它们传递给子模块并导致意外结果(例如克隆证书可验证的 HTTPS 子模块而无需验证)。一种解决方法是设置 GIT_SSL_NO_VERIFY git submodule 的环境变量命令:

# Set the environment variable is sufficient, no content is necessary
GIT_SSL_NO_VERIFY= git submodule add ...

关于git submodule add + 不工作 + 获取 ssl 服务器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40120374/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com