0

我正在配置 Gerrit-Trigger/Jenkins 作业,它会在开发人员签入代码时进行验证。我看到这项工作失败了,因为 Jenkins 没有选择 Gerrit 参数。以下是我得到的错误:

> /usr/bin/git -c core.askpass=true fetch --tags --progress ssh://<Gerrit URL>.git $GERRIT_REFSPEC
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from ssh://<Gerrit URL>.git
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1738)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress ssh://<Gerrit URL>.git $GERRIT_REFSPEC" returned status code 128:
stdout: 
stderr: fatal: Couldn't find remote ref $GERRIT_REFSPEC

如何配置 Jenkins 以选择所有 Gerrit 参数?

-谢谢

4

0 回答 0