wugang0 2020-01-06
例如创建si.li这个用户时,jenkins提示User name must only contain alphanumeric characters, underscore and dash
先在/etc/sysconfig/jenkins配置文件最后一行增加如下这行
JAVA_ARGS="[]+"
然后在jenkins的启动脚本中/etc/init.d/jenkins找到关键词JAVA_CMD
,如下所示设置:
JAVA_CMD="$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -Dhudson.security.HudsonPrivateSecurityRealm.ID_REGEX=$JAVA_ARGS -jar $JENKINS_WAR"
然后重启jenkins即可
/etc/init.d/jenkins restart