title: Jenkins Maven Release with GIT
body: <p>I got Jenkins set up with SSH connection to Git, using SSH agent and trying to set up a job, which would do Maven Release build. The job is executing following commands</p>
  
  <pre><code>-Dresume=false release:prepare release:perform  
  -Dresume=false -DdryRun=true release:prepare
  </code></pre>
  
  <p>During deployment with maven-deploy-plugin I run into error,</p>
  
  <pre><code>[INFO] [INFO] 
  [INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ uaiContacts ---
  [INFO] [INFO] ------------------------------------------------------------------------
  [INFO] [INFO] BUILD FAILURE
  [INFO] [INFO] ------------------------------------------------------------------------
  [INFO] [INFO] Total time: 4.151 s
  [INFO] [INFO] Finished at: 2015-09-23T11:35:32+01:00
  [INFO] [INFO] Final Memory: 27M/265M
  [INFO] [INFO] ------------------------------------------------------------------------
  [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project uaiContacts: Failed to deploy artifacts/metadata: Cannot access git@giturl:repo with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access git@giturl:repo using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
  [INFO] [ERROR] role: org.apache.maven.wagon.Wagon
  [INFO] [ERROR] roleHint: git@giturl
  [INFO] [ERROR] -&gt; [Help 1]
  [INFO] [ERROR] 
  [INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [INFO] [ERROR] 
  [INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>I am not sure why is it saying cannot access and how is it trying to access. As I am aware wagon will be using ssh, so there should not be a problem.</p>
  
  <p>My pom.xml </p>
  
  <pre><code>    &lt;build&gt;
           &lt;extensions&gt;
              &lt;extension&gt;
                  &lt;groupId&gt;org.apache.maven.wagon&lt;/groupId&gt;
                  &lt;artifactId&gt;wagon-ssh&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
              &lt;/extension&gt;
           &lt;/extensions&gt;
      &lt;/build&gt;
  
      &lt;scm&gt;
          &lt;connection&gt;scm:git:git@giturl:repo&lt;/connection&gt;
          &lt;developerConnection&gt;scm:git:git@giturl:repo&lt;/developerConnection&gt;
          &lt;url&gt;git@giturl:repo&lt;/url&gt;  
          &lt;tag&gt;HEAD&lt;/tag&gt;
      &lt;/scm&gt;
  
      &lt;distributionManagement&gt;
        &lt;repository&gt;
          &lt;id&gt;release&lt;/id&gt;
          &lt;url&gt;git@giturl:repo&lt;/url&gt;
        &lt;/repository&gt;
      &lt;/distributionManagement&gt;
  </code></pre>