gpt4 book ai didi

git - Jenkins git maven 发布 - git push 失败/更新被拒绝

转载 作者:行者123 更新时间:2023-12-04 13:01:29 25 4
gpt4 key购买 nike

我正在尝试使用 git 实现 Jenkins maven 版本。我关注了 this指南,但我的版本因以下错误而失败。它在 push 时提示。我正在使用工作区清理插件,所以每次都应该获取项目的新副本。我不确定为什么会收到此错误。

我尝试添加一个执行“git fetch”和“git pull origin master”的前置步骤,但我仍然收到错误消息。它似乎是在 jenkins 工作区以外的其他地方创建本地存储库。有人可以指出我正确的方向吗?

10:44:05 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli) on project test: Unable to commit files
10:44:05 [ERROR] Provider message:
10:44:05 [ERROR] The git-push command failed.
10:44:05 [ERROR] Command output:
10:44:05 [ERROR] To ssh://abc.example.com/test.git
10:44:05 [ERROR] ! [rejected] master -> master (fetch first)
10:44:05 [ERROR] error: failed to push some refs to 'ssh://gitlab@abc.example.com/test.git'
10:44:05 [ERROR] hint: Updates were rejected because the remote contains work that you do
10:44:05 [ERROR] hint: not have locally. This is usually caused by another repository pushing
10:44:05 [ERROR] hint: to the same ref. You may want to first integrate the remote changes
10:44:05 [ERROR] hint: (e.g., 'git pull ...') before pushing again.
10:44:05 [ERROR] hint: See the 'Note about fast-forwards' in 'git push --help' for details.
10:44:05 [ERROR] -> [Help 1]

最佳答案

我通过创建一个新的 jenkins 工作解决了这个问题。之后一切正常。

关于git - Jenkins git maven 发布 - git push 失败/更新被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55887271/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com