Tips of Jenkins
Reference:
https://www.cnblogs.com/shuoer/p/9471839.html
https://www.jianshu.com/p/845f267aec52
- No response while execute:
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
Resolve:
Remove “-q”, use the following command to display status:
wget -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
If the following information appears, change WiFi connecting and try again while above error appear. (Use “HUAWEI-****”, without “_5G”).
xzchen@xzchen-Inspiron-7472:~$ wget -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - --2019-01-11 15:53:59-- https://pkg.jenkins.io/debian-stable/jenkins.io.key 正在解析主机 pkg.jenkins.io (pkg.jenkins.io)… 52.202.51.185 正在连接 pkg.jenkins.io (pkg.jenkins.io)|52.202.51.185|:443… 失败:连接超时。 重试中。
-
sudo apt-get update error:
xzchen@xzchen-Inspiron-7472:~$ sudo apt-get update
命中:1 http://cn.archive.ubuntu.com/ubuntu bionic InRelease
获取:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
获取:3 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
忽略:4 http://pkg.jenkins.io/debian-stable binary/ InRelease
命中:5 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
获取:6 http://cn.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
获取:7 http://pkg.jenkins.io/debian-stable binary/ Release [2,042 B]
获取:8 http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease [18.1 kB]
获取:9 http://pkg.jenkins.io/debian-stable binary/ Release.gpg [181 B]
忽略:9 http://pkg.jenkins.io/debian-stable binary/ Release.gpg
正在读取软件包列表… 完成
W: GPG 错误:http://pkg.jenkins.io/debian-stable binary/ Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY 9B7D32F2D50582E6
E: 仓库 “http://pkg.jenkins.io/debian-stable binary/ Release” 没有数字签名。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
Resolve:
Run the following command, then run “sudo apt-get update” again.
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 9B7D32F2D50582E6
-
Check default port 8080 after install Jenkins:
Open “http://localhost:8080” in browser. -
Start Jenkins service:
sudo /var/snap/Jenkins start
-
Firewall:
run “sudo ufw enable” if firewall is disable.
Reference: http://wiki.ubuntu.org.cn/UFW防火墙简单设置
-
Get password while unlocking Jenkins:
Replace the password path with the path on your own page. -
Jenkins instance appears to be offline after input password:
Open http://localhost:8080/pluginManager/advanced . Click “升级站点” in the bottom. Use “http” instead of “https” (http://updates.jenkins.io/update-center.json).
Then open http://localhost:8080/reload in browser.
Then open http://localhost:8080/restart in browser to restart jenkins.
Finally open http://localhost:8080/ in browser again. -
Restart Jenkins after installing plugins.