title: Jenkins - Can't push tag to remote repository
body: <p>I have just installed Jenkins on windows 7 and tried to create a test build for github repositories.</p>
  
  <p>I tried to create a very simple build and it was successful. Now I wanted to try "Git Publisher" post build action. I thought of pushing a simple tag after successful build.</p>
  
  <p>Here is the screen-shot of the build job:</p>
  
  <p><img src="https://i.stack.imgur.com/SUPxx.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/TYDTs.png" alt="enter image description here"></p>
  
  <p>But when I am building the job it consistently gives below error on console. I can guess that issue is related to credentials and account setup but I don't know to proceed. Please point me to some references which can help me out.</p>
  
  <p><img src="https://i.stack.imgur.com/kwgrt.png" alt="enter image description here"></p>
  
  <p>Here is the screen-shot of manage credentials. The only problem is once I save and re-open "Manage Credentials" ssh private key disappears.</p>
  
  <p><img src="https://i.stack.imgur.com/Kb0j8.png" alt="enter image description here"></p>
  
  <p><strong>[EDIT-1] After the ssh key setup, I am getting below error message now:</strong></p>
  
  <pre><code>&gt;     21:58:24  Pushing tag tag02 to repo gitrepo
  &gt;     21:58:24  ERROR: Failed to push tag tag02 to gitrepo
  &gt;     21:58:24  hudson.plugins.git.GitException: Error performing command: /usr/bin/git push
  &gt; git@github.paypal.com:atagrawal/maven-test-3.git tag02
  &gt;     21:58:24  Command "/usr/bin/git push git@github.paypal.com:atagrawal/maven-test-3.git tag02" returned
  &gt; status code 128: ERROR: Permission to atagrawal/maven-test-3.git
  &gt; denied to gitadmin.
  &gt;     21:58:24  fatal: The remote end hung up unexpectedly
  &gt;     21:58:24  
  &gt;     21:58:24      at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:776)
  &gt;     21:58:24      at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:741)
  &gt;     21:58:24      at hudson.plugins.git.GitAPI.push(GitAPI.java:788)
  &gt;     21:58:24      at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:277)
  &gt;     21:58:24      at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:247)
  &gt;     21:58:24      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2154)
  &gt;     21:58:24      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
  &gt;     21:58:24      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
  &gt;     21:58:24      at hudson.remoting.Request$2.run(Request.java:287)
  &gt;     21:58:24      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
  &gt;     21:58:24      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
  &gt;     21:58:24      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  &gt;     21:58:24      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  &gt;     21:58:24      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  &gt;     21:58:24      at java.lang.Thread.run(Thread.java:619)
  &gt;     21:58:24  Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git push git@github.paypal.com:atagrawal/maven-test-3.git
  &gt; tag02" returned status code 128: ERROR: Permission to
  &gt; atagrawal/maven-test-3.git denied to gitadmin.
  &gt;     21:58:24  fatal: The remote end hung up unexpectedly
  &gt;     21:58:24  
  &gt;     21:58:24      at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:771)
  &gt;     21:58:24      ... 14 more
  &gt;     21:58:24  Build step 'Git Publisher' changed build result to FAILURE
  &gt;     21:58:24  Build step 'Git Publisher' marked build as failure
  &gt;     21:58:24  ### mvnpublisher.perform:class hudson.maven.MavenModuleSet
  </code></pre>