I have generated an ssh key from my jenkins server and added it to my profile in Stash.(version 2.3)
I have also created a .netrc file in my user.home for permanent auth.
I am using http to pull code in my jenkins job configuration and I am facing this error.
Cloning repository http://user1@10.1.x.x:7990/scm/sw/myrepo.git
git --version
git version 1.8.2.1
ERROR: Error cloning remote repo 'myrepo' : Could not clone http://user1@10.1.x.x:7990/scm/sw/myrepo.git
hudson.plugins.git.GitException: Could not clone http://user1@10.1.x.x:7990/scm/sw/myrepo.git
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:219)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1001)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
at hudson.FilePath.act(FilePath.java:842)
at hudson.FilePath.act(FilePath.java:824)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1502)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: hudson.plugins.git.GitException: Command "/usr/local/bin/git clone --progress -o myrepo http://user1@10.1.x.x:7990/scm/sw/myrepo.git /jenkins/jobs/myrepo_GIT_CI/workspace" returned status code 128:
stdout: Cloning into '/jenkins/jobs/myrepo_GIT_CI/workspace'...
stderr: fatal: Authentication failed