解决https SSL自签名证书无效问题

番外篇-解决https SSL自签名证书无效问题

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

# 本机git窗口操作:将导出的证书from_gitlab.cer证书复制到/usr/local/jdk1.8.0_45/jre/lib/security目录下
scp C:/Users/helenlv/Desktop/DEVOPS/from_gitlab.cer [email protected]:/usr/local/jdk1.8.0_45/jre/lib/security
[root@gitlab ~]# cd /usr/local/jdk1.8.0_45/jre/lib/security/
[root@gitlab security]# keytool -import -alias from_gitlab -keystore cacerts -file from_gitlab.cer
Enter keystore password:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
[root@gitlab security]# keytool -import -alias from_gitlab -keystore cacerts -file from_gitlab.cer
Enter keystore password:
- 此处省略n行输出,上面密码的changeit
Trust this certificate? [no]:  Y
Certificate was added to keystore
[root@gitlab security]# keytool -list -keystore cacerts -alias from_gitlab
Enter keystore password: 此处密码的changeit

将自签名证书加入【受信任的根证书颁发机构】

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述


发布了44 篇原创文章 · 获赞 12 · 访问量 8362

猜你喜欢

转载自blog.csdn.net/GongMeiyan/article/details/104030780