Jenkins remote build trigger (eg: from git push) tokens

本文介绍如何解决升级后的Jenkins无法通过Git push远程触发构建的问题。具体步骤包括:在项目配置中启用远程触发选项并设置认证令牌,然后修改git hook使用curl或wget命令来触发构建。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

After upgrading my Sid virtual machine hosting my Jenkins, build after git push stopped working. This is because version 1.503 and above require an auth token for triggering the build. Since it took me some time to search the web, I’ve decided to blog about it to save time to other Jenkins users.

Under each project configuration screen, in the “Build Triggers” section, tick the “Trigger builds remotely (e.g., from scripts)” option. Then enter a random token (I used a password generator for it). Then in your post-receive hook, use what’s below:

wget -q --no-check-certificate https://<jenkins-url>/job/heat/build?token=<your-token>

原文http://www.tuicool.com/articles/rIz6R3
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值