jenkins 安装踩坑记录
一、添加apt-key之后update报如下错
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: xxxxxxx 443] Reading package lists... Done
解决方案:
sudo apt install ca-certificates sudo apt-get update
二、修改默认端口
#文件1 /etc/init.d/jenkins #搜索8080 替换成需要修改的端口 #文件2 /etc/default/jenkins HTTP_PORT=xxxx #文件3 /usr/lib/systemd/system/jenkins.service # 修改为想要的端口 Environment="JENKINS_PORT=8889" # 重新加载配置文件 systemctl daemon-reload
三、修改账号密码
寻找对应的账号文件 /var/lib/jenkins/users/账号名
_xxxxxxxxxxxx/config.xml,或者直接执行命令
sudo find / -name config.xml
然后修改<passwordHash>节点,将其内容替换为
#jbcrypt:$2a$10$DdaWzN64JgUtLdvxWIflcuQu2fgrrMSAMabF5TSrGK5nXitqK9ZMS //注意前后不要有空格
保存,然后重启jenkins,重启后密码为111111