1.Ubuntu16上安装了Jenkins突然无法登录:
解决办法:
找到 /var/lib/jenkins config.xml 进行备份
将以下代码删除:
<useSecurity>true</useSecurity> <authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy"> <denyAnonymousReadAccess>true</denyAnonymousReadAccess> </authorizationStrategy> <securityRealm class="hudson.security.HudsonPrivateSecurityRealm"> <disableSignup>true</disableSignup> <enableCaptcha>false</enableCaptcha> </securityRealm>
重启:service Jenkins restart
详细:https://blog.csdn.net/qq_38959715/article/details/102538285
2.Jenkins账户在Ubuntu系统下的权限问题
sudo passwd jenkins设置密码
添加至root组(可能有影响)
3.无法执行source命令
shell脚本前加上:#!/bin/bash -il
4.远程到其他服务器上可以通过远程服务器安装sudo apt-get expect
shell脚本带上
#!/usr/bin/expect
参考:https://blog.51cto.com/14316149/2419456
原文地址:https://www.cnblogs.com/cliu/p/12635188.html
时间: 2024-11-08 21:49:29