問(wèn)題
當(dāng)沒(méi)有登陸Jenkins棚赔,直接在瀏覽器中輸入一個(gè)Jenkins URL,例如:https://Jenkins:8080/job/sample_1/
系統(tǒng)沒(méi)有跳轉(zhuǎn)到登陸界面提示用戶登錄系吩,而是直接報(bào)告 HTTP 404来庭。
原因
這是由于 ‘Job Discover’ 的權(quán)限沒(méi)有打開(kāi)。
如果你用 Role-based Authorization Strategy 插件穿挨, 在 [Jenkins]=>[Manage And Assign Role]=>[Manage and Assign Roles] 頁(yè)面你會(huì)發(fā)現(xiàn) Job 中有一個(gè) ‘Discover’ 項(xiàng)目月弛,選中它,就可以實(shí)現(xiàn)匿名用戶訪問(wèn) Jenkins URL 跳轉(zhuǎn)到登陸界面科盛。
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.