官方配置文档

https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin

 

Jenkins配置权限错误出现 access denied

修改方式:

• 修改$Jenkins_home/config.xml文件:设置 <useSecurity>false</useSecurity>

• 删除authorizationStrategy、securityRealm节点

• 重新启动Jenkins

进入Jenkins就不用密码

 

权限控制(这边使用基于角色的权限控制,比较简单也常用)

在插件管理中安装如下插件:

Jenkins用户权限配置

 

【系统管理】-【Configure Global Security】

Jenkins用户权限配置

 

之后选择【系统管理】点击下面链接

Jenkins用户权限配置

 

Jenkins用户权限配置

 

【manage roles】中添加对应权限,配置相应角色

Jenkins用户权限配置

我这边开发设置如下权限

 

Jenkins用户权限配置

 

【assign roles】中分配用户权限 ,箭头Anonymous别勾选角色,不然导致不登录也能访问

Jenkins用户权限配置

 

项目权限配置

https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin

 

Global Roles vs. Project Roles

It should be noted that the Global Roles override anything you specify in the Project Roles. That is, when you give a role the right to Job-Read in the Global Roles, then this role is allowed to read all Jobs, no matter what you specify in the Project Roles.

It may therefore be advisable to leave most (all) options unchecked in Job, Run and SCM in the Global Roles section for normal users.

转载于:https://my.oschina.net/yugj/blog/849716

相关文章: