[Jenkins-infra] Jenkins git maven release - git push failed/updates were rejected

Ajay Sawant linux.ajaysawant at gmail.com
Sun Apr 28 12:53:48 UTC 2019

I am trying to implement Jenkins maven release with git. I followed this
<http://elizabetht.github.io/blog/2014/02/05/jenkins-release-upload/> guide
but my release is failing with below error. It is complaining while
pushing. I am using workspace cleanup plugin so every time it should take
the fresh copy of project. I am not sure why am I getting this error.

I tried to add a pre step which will do the "git fetch" and "git pull
origin master" but I am still getting the error. It seems it is creating
the local repo somewhere else than jenkins workspace. Can someone point me
to correct direction?

10:44:05 [ERROR] Failed to execute goal
(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
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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jenkins-ci.org/pipermail/jenkins-infra/attachments/20190428/711dec0a/attachment.html>

More information about the Jenkins-infra mailing list