title: Maven release with jenkins slave and Credentials : how to pass SCM credentials to maven?
body: <p>I'm using a Jenkins master/slave setup. I'd like Jenkins to have one "source" of information for credentials. Not keys/passwords scattered all over the place. </p>
  
  <p>So, I don't want to define my SCM in Jenkins (with credentials from the Jenkins Credential provider) and then again in the pom.xml/settings.xml/id_rsa.pem depending on job. Everybody likes to make their own way of doing things and we end up with copies of the keyfile or passwords all over the place. Sooner or later someone pushes a pom to a public repo and our server is compromised...</p>
  
  <p>I cannot see a maintainable way of getting the credentials out of Jenkins into somewhere maven release plugin can use them. What am I missing?
  (maven release fails when trying to push the tags to git</p>
  
  <pre><code>[ERROR] The git-push command failed.
  [ERROR] Command output:
  [ERROR] Permission denied (publickey).
  </code></pre>
  
  <p>)</p>
  
  <p>I could obviously define a "file" that gets installed on the slave that contains the pem (I can think of several ways to do that) but then I have a maintenance headache when we rotate keys to remember it's in multiple locations. Otherwise, snapshots work for a month and then the release fails and nobody can figure why mvn suddenly can't push to git.</p>
  
  <p>(NB it's key login only, no passwords)</p>