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

场景

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

Jenkins中安装Credentials Binding插件实现凭证管理与安装Git插件和拉取代码构建项目_BADAO_LIUMANG_QIZHI的博客-CSDN博客

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

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

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

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

 

注:

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

实现

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

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

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

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

然后将其修改为main

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

再次构建成功

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

 

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


下一篇:nvidia-smi has failed because it couldn't communicate with the nvidia driver