Jenkins RestAPI调用出现Error 403 No valid crumb was included in the request [亲测有用]
方法一(不推荐):
在jenkins 的Configure Global Security下 , 取消“防止跨站点请求伪造(Prevent Cross Site Request Forgery exploits)”的勾选
方法二:
1、获取用户API token
http://Jenkins_IP:8080/user/admin/configure
点击 show API Token,假设是API_TOKEN
ps:首先你要保证你登录的用户有API token,如果没有就添加一个
2、计算CRUMB
CRUMB=$(curl -s ‘http://USER:API_TOKEN@Jenkins_IP:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)’)
案例:
CRUMB=$(curl -s 'http://admin:1138edcda28ffed9cd568ba9ef89d2117f@192.168.137.100:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)')
3、请求时附带CRUMB信息即可
curl -X POST -H “$CRUMB”*http://USER:API_TOKEN@cd.web.tc.ted:8080/reload
案例:
curl -X POST -H "$CRUMB" http://admin:1138edcda28ffed9cd568ba9ef89d2117f@192.168.137.100:8080/job/file_test/build
结果:
这样就可以通过API接口进行构建Job了~~~~
Jenkins RestAPI调用出现Error 403 No valid crumb was included in the request [亲测有用]相关推荐
- 新版Jenkins关闭CSRF“HTTP ERROR 403 No valid crumb was included in the request“
新版Jenkins关闭CSRF hudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION = true & ...
- jenkins-RestAPI调用出现Error 403 No valid crumb was included in the request解决方法
方法一: 在jenkins 的Configure Global Security下 , 取消"防止跨站点请求伪造(Prevent Cross Site Request Forgery exp ...
- 火狐Error 403 No valid crumb was included in the request并且浏览器一直是loading中
我用 linux 的火狐使用 jenkins 的时候报出 Error 403 No valid crumb was included in the request 然后访问 jenkins 的一些配置 ...
- jenkins 出现“Error 403 No valid crumb was included in the request ”的解决方案
背景介绍 开发的jenkins job 在local的 一台windows 上,而我们测试的jenkins job 在azure 上的一台windows server 2012 上.由于 azure上 ...
- Error 403 No valid crumb was included in the request 报错解决 容器化jenkins关闭CSRF
现象 gitlab 连接 安装在容器中的jenkins时,如果使用的是高版本的 jenkins ,会出现403错误,Error 403 No valid crumb was included in t ...
- HTTP ERROR 403 No valid crumb was included in the request ~jenkins 太高的版本错误。降低版本
HTTP ERROR 403 No valid crumb was included in the request URI: /buildByToken/build STATUS: 403 MESSA ...
- 解决Error:403 No valid crumb was included in the request
Jenkins错误备忘:Error:403 No valid crumb was included in the request 在Jenkins上创建流水线后不能save,报这个错. 解决办法: 登 ...
- jenkins2.3031 出现“Error 403 No valid crumb was included in the request ”的解决方案
jenkins2.3031 出现"Error 403 No valid crumb was included in the request "的解决方案 记录一下,在配置jenki ...
- 【笔记】Jenkins- 解决 “Error 403 No valid crumb was included in the request“
目录 问题 解决办法(亲测) 问题 HTTP ERROR 403 No valid crumb was included in the request 解决办法(亲测) Dashboard -> ...
最新文章
- iOS与JS交互的4种方法
- Java格式化日期用斜杠_[java工具类01]__构建格式化输出日期和时间的工具类
- 导致定时器失效_IIS进程回收导致定时器失效的解决方法(CMD命令)
- 算法-Valid Anagram
- VMWare安装黑苹果Mac OS
- 交换机端口镜像(锐捷)
- 吴恩达 coursera AI 第四课总结+作业答案
- JS中的map函数(会改变不是基本类型的数组的值)
- 阿里云官方网站免费套餐怎么抢
- oracle-01940,ORA-01940: 无法删除当前已连接的用户的错误,该如何解决呢?
- hook(钩子函数)
- ubuntu14.04 64bit安装android的NDK开发环境
- [多媒体] m3u8简介
- 四款常见IT自动化运维工具简单介绍-行云管家
- Excel自动批量发邮件
- 编写程序 - 打印购物小票.
- Windows 10 截图工具
- #Python小技巧#教你用Python在Excel里画画
- end=强制打印成一行;\t拉大列间距_xing2516_新浪博客
- 网易服务器维护中,网易:22日凌晨3点服务器维护,预计时间10小时