问题
当没有登陆Jenkins,直接在浏览器中输入一个Jenkins URL,例如:https://Jenkins:8080/job/sample_1/
系统没有跳转到登陆界面提示用户登录,而是直接报告 HTTP 404。
原因
这是由于 ‘Job Discover’ 的权限没有打开。
如果你用 Role-based Authorization Strategy 插件, 在 [Jenkins]=>[Manage And Assign Role]=>[Manage and Assign Roles] 页面你会发现 Job 中有一个 ‘Discover’ 项目,选中它,就可以实现匿名用户访问 Jenkins URL 跳转到登陆界面。
Reference
"Job DISCOVER" means
"This permission grants discover access to jobs. Lower than read permissions, it allows you to redirect anonymous users to the login page when they try to access a job url. Without it they would get a 404 error and wouldnt be able to discover project names.