【问题标题】:stderr: fatal: couldn't find remote ref refs/heads/master标准错误:致命:找不到远程参考 refs/heads/master
【发布时间】:2022-10-24 00:12:45
【问题描述】:

我为我的项目创建了一个 Jenkins 管道。我遇到了git checkout 阶段的问题。

以下是错误:

stderr: fatal: couldn't find remote ref refs/heads/master

错误截图:

帮助我找到解决此错误的正确解决方案。提前致谢 :)

【问题讨论】:

    标签: git jenkins jenkins-pipeline


    【解决方案1】:

    您可能需要检查您的 GitHub 分支名称是否正确。

    它是说“远程参考参考/头/主”分支不是正确的。

    【讨论】:

      【解决方案2】:

      在这里修复了同样的问题。 GitHub 中的分支名称已更改为“main”。因此,您需要更改 Jenkins 上的分支说明符,如下所示:

      您在 Jenkins/"Configuration"/"Pipeline"/"Branches to build"/"Branch Specifier" 上的项目 -> 更改为“/main" (it was "/master")

      然后问题解决了

      【讨论】:

        猜你喜欢
        • 2015-11-20
        • 2012-12-12
        • 2020-09-21
        • 1970-01-01
        • 2022-08-15
        • 1970-01-01
        • 2011-06-20
        • 2011-10-19
        相关资源
        最近更新 更多