获取无效路径异常:试图< :>从SCM提取时Jenkins的字符非法

mqkwyuun  于 2022-12-03  发布在  Jenkins
关注(0)|答案(2)|浏览(217)

当在Jenkins上构建项目的初始阶段涉及从Git仓库中提取新文件时,提取失败,构建无法继续。
这是生成期间的控制台输出

Building in workspace C:\Program Files (x86)\Jenkins\workspace\xxxxxxx
FATAL: Illegal char <:> at index 5: https://xxxxxxx@bitbucket.org/xxxxxx.git
java.nio.file.InvalidPathException: Illegal char <:> at index 5: https://xxxxxx@bitbucket.org/xxxxxx.git
    at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
    at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
    at java.base/java.nio.file.Path.of(Path.java:147)
    at java.base/java.nio.file.Paths.get(Paths.java:69)
    at hudson.plugins.git.GitSCM.abortIfSourceIsLocal(GitSCM.java:1399)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1282)
    at hudson.scm.SCM.checkout(SCM.java:540)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1217)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:519)
    at hudson.model.Run.execute(Run.java:1897)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
    at hudson.model.ResourceController.execute(ResourceController.java:101)
    at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE

是否有其他人遇到过这种情况并知道如何解决?
需要说明的是,Jenkins昨天构建的很成功,在今天早上对Jenkins应用了一些更新后,失败发生了。我回滚了Jenkins更新,但仍然有这个问题

xsuvu9jc

xsuvu9jc1#

正如Asturio提到的,Git插件有问题。他们已经发布了一个修补程序,更新到最新版本后,我们就可以开始了:)

omqzjyyz

omqzjyyz2#

更新Jenkins的git插件到4.11.3版,它已经修复了这个bug。请从Jenkins管理器--〉管理插件--〉更新git

相关问题