首页 > 解决方案 > 詹金斯 - 找不到任何要构建的修订版

问题描述

我已经使用 Jenkins 几天了,之前:我使用了 GITEA 插件现在我已经将我的项目切换到 GitBucket,我想使用“Webhook 构建”功能。

我遵循了许多教程,现在:我陷入了一个简单/大问题。

事先,很抱歉必须模糊敏感链接,我知道这很烦人。

这是完整的错误:

using credential 10
Wiping out workspace first.
Contributing variables:



Cloning the remote Git repository
Cloning repository https://MY_GITBUCKET/git/MY_USERNAME/MY_PROJECT
 > git init /Jenkins/workspace/GitBUcket # timeout=10
Fetching upstream changes from https://MY_GITBUCKET/git/MY_USERNAME/MY_PROJECT
 > git --version # timeout=10
 > git --version # 'git version 2.20.1'
using GIT_ASKPASS to set credentials Utilisateur GitBucket Perso
 > git fetch --tags --force --progress -- https://MY_GITBUCKET/git/MY_USERNAME/MY_PROJECT +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://MY_GITBUCKET/git/MY_USERNAME/MY_PROJECT # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
Seen 0 remote branches
 > git show-ref --tags -d # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

这是我在 Jenkins 上的配置: https ://i.stack.imgur.com/jdlTt.png

非常感谢您提前

编辑:我唯一的分支是 master --> https://i.imgur.com/lXJ0xyN.png

标签: jenkins

解决方案



这是您可以尝试的:

  1. 管理 Jenkins -> 全局工具配置 -> Git
    • 检查是否设置了 Git 可执行文件的路径:C:\PATH\git.exe
  2. 仪表板 -> 选择你的工作 -> 配置 -> 源代码管理 -> 选择 Git
    • 插入您的存储库 URL 和凭据(可选),然后在分支下构建更改 */master 为 * /main


推荐阅读