如何解决无法为所有用户将根 CA 导入 Ubuntu
我现在尝试了几个小时将公司签名的根 CA 导入到 Docker 映像/容器,但失败了。
我已经把它们放在了那些地方
/usr/local/share/ca-certificates/
/usr/local/ca-certificates/
/usr/share/ca-certificates/
/etc/ssl/certs/
然后运行更新 sudo update-ca-certificates
当我尝试以 root 用户身份卷曲某些东西时,它工作得很好:
root@container-run-60ec45094cedfd00078551d9:~# curl https://httpbin.org/ip -x companyproxy.de:8080
{
"origin": "xxx.xx.xx.xxx"
}
但是当我以普通用户身份运行时,出现 SSL 错误:
ubuntu@container-run-60ec45094cedfd00078551d9:/mnt$ curl https://httpbin.org/ip -x companyproxy.de:8080
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it,please visit the web page mentioned above.
当我检查 Certs curl 使用的是什么时,我得到以下信息:
root : * CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
ubuntu: * CAfile: /usr/local/anaconda/ssl/cacert.pem
CApath: none
我查看了所有文件夹的权限,每个用户都应该具有读取/执行权限。我什至试过一次把所有东西都放在 777 上。
显然就像 curl 一样,当我以 ubuntu
运行它时,所有其他程序都在做同样的事情。
知道在哪里可以为所有用户导入全局证书吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。