<div dir="ltr"><div><div class="gmail-votecell gmail-post-layout--left" style="margin:0px;padding:0px 15px 0px 0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;vertical-align:top;box-sizing:inherit;width:auto;color:rgb(36,39,41)"><div class="gmail-js-voting-container gmail-grid gmail-fd-column gmail-ai-stretch gmail-gs4 gmail-fc-black-200" style="padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;display:flex;color:rgb(187,192,196)"><div class="gmail-js-vote-count gmail-grid--cell gmail-fc-black-500 gmail-fs-title gmail-grid gmail-fd-column gmail-ai-center" style="margin:2px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;display:flex;font-size:1.61538rem;color:rgb(106,115,124)"><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;font-size:15px;color:rgb(36,39,41)">I am trying to implement Jenkins maven release with git. I followed</span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;font-size:15px;color:rgb(36,39,41)"> </span><a href="http://elizabetht.github.io/blog/2014/02/05/jenkins-release-upload/" rel="nofollow noreferrer" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:15px;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(0,89,153)">this</a><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;font-size:15px;color:rgb(36,39,41)"> </span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;font-size:15px;color:rgb(36,39,41)">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.</span></div></div></div><div class="gmail-postcell gmail-post-layout--right" style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;vertical-align:top;box-sizing:inherit;width:auto;min-width:0px;color:rgb(36,39,41)"><div class="gmail-post-text" style="margin:0px 0px 5px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:1.3;font-size:15px;vertical-align:baseline;box-sizing:inherit;width:675.333px"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;clear:both">I tried to add a pre step which will do the "<code style="margin:0px;padding:1px 5px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;background-color:rgb(239,240,241);white-space:pre-wrap">git fetch</code>" and "<code style="margin:0px;padding:1px 5px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;background-color:rgb(239,240,241);white-space:pre-wrap">git pull origin master</code>" 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?</p><pre class="gmail-lang-xml gmail-prettyprint gmail-prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:rgb(239,240,241);border-radius:3px;color:rgb(57,51,24)"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;white-space:inherit"><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">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://<a href="http://abc.example.com/test.git">abc.example.com/test.git</a>
10:44:05 [ERROR] ! [rejected]          master -> master (fetch first)
10:44:05 [ERROR] error: failed to push some refs to 'ssh://<a href="http://gitlab@abc.example.com/test.git">gitlab@abc.example.com/test.git</a>'
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]</span></code></pre><pre class="gmail-lang-xml gmail-prettyprint gmail-prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:12px 8px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:rgb(239,240,241);border-radius:3px;color:rgb(57,51,24)"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;vertical-align:baseline;box-sizing:inherit;white-space:inherit"><span class="gmail-pln" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)"><br></span></code></pre></div></div></div><a href="https://stackoverflow.com/questions/55887271/jenkins-git-maven-release-git-push-failed-updates-were-rejected?noredirect=1#comment98434102_55887271">https://stackoverflow.com/questions/55887271/jenkins-git-maven-release-git-push-failed-updates-were-rejected?noredirect=1#comment98434102_55887271</a>  <br><div><br></div></div>