Jenkins中构建时提示:Couldn't find any revision to build. Verify the repository and branch config

场景

Jenkins中安装Credentials Binding插件实现凭证管理与安装Git插件和拉取代码构建项目:

https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/116746646

在按照上面的流程构建项目时流程没有问题。

但是在使用新版的Gitlab时提示:

Couldn't find any revision to build. Verify the repository and branch config

注:

博客:
https://blog.csdn.net/badao_liumang_qizhi
关注公众号
霸道的程序猿
获取编程相关电子书、教程推送与免费下载。

实现

这是因为最新的gitlab的默认分支不再是master,而是main分支

然后在Jenkins中指定分支默认还是master

然后将其修改为main

再次构建成功

博客园: https://www.cnblogs.com/badaoliumangqizhi/ 关注公众号 霸道的程序猿 获取编程相关电子书、教程推送与免费下载。
原文地址:https://www.cnblogs.com/badaoliumangqizhi/p/15262307.html