JENKINS身份验证失败 [英] JENKINS Authentication Fails

查看:1719
本文介绍了JENKINS身份验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试从任何REST客户端触发Jenkins作业时出现以下错误

I am getting the following error while trying to trigger Jenkins job from any REST Client


Authentication required

     <!-- You are authenticated as: anonymous
Groups that you are in:

Permission you need to have (but didn't):
hudson.model.Hudson.Read
... which is implied by: hudson.security.Permission.GenericRead
... which is implied by: hudson.model.Hudson.Administer
-->
    </body> </html>


在从终端使用curl时触发了请求

The request is getting triggered while using curl from terminal

我正在使用以下语法

http:// user:apiToken@jenkins.yourcompany.com/job/your_job/build/token=令牌
[ ref: https://wiki.jenkins-ci.org/display/ JENKINS / Authenticating + scripted + clients]

ie。 curl -X POST http:// user:apiToken@jenkins.yourcompany .com / job / your_job / build?token = TOKEN

ie. curl -X POST http://user:apiToken@jenkins.yourcompany.com/job/your_job/build?token=TOKEN

推荐答案

选中此此构建已参数化,从下拉列表中选择凭据参数。
使用此

Check this "This build is parameterized " , select the credentials parameter from drop down. Use this

curl -X POST http://jenkins.rtcamp.com/job/Snapbox/buildWithParameters --user "username:password"

它解决了我的身份验证问题。

It solved my authentication problem.

我希望它也会对其他人有所帮助。

I hope it will help others too.

这篇关于JENKINS身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆