~ / archivo / stackoverflow / 44788803
Jenkins is not able to pull code from private bitbucket cloud repo
-
I am trying to connect bitbucket private repo to jenkins. I have setup a webhook in Bitbucket. As well as added credentials to Jenkins. Still my build is getting stuck and not able to pull the source from Bitbucket. I know it's only in private repo, because i have tried to connect with public bitbucket repo and it worked fine.
here is the error i am getting in jenkins
ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from https://xxxx@bitbucket.org/xxxxx/test2.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1281) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1735) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405) Caused by: hudson.plugins.git.GitException: Error performing git command at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1886) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1596) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807) ... 11 more Caused by: org.jvnet.winp.WinpException: Failed to read RT_USER_PROCESS_PARAMETERS error=299 at envvar-cmdline.cpp:151 at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method) at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126) at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102) at hudson.util.ProcessTree$WindowsOSProcess.getArguments(ProcessTree.java:451) at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:56) at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:243) at hudson.util.ProcessTree$WindowsOSProcess.killRecursively(ProcessTree.java:429) at hudson.util.ProcessTree.killAll(ProcessTree.java:146) at hudson.Proc$LocalProc.destroy(Proc.java:380) at hudson.Proc$LocalProc.join(Proc.java:353) at hudson.Proc.joinWithTimeout(Proc.java:166) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1873) ... 15 more ERROR: null Finished: FAILUREFurther research:
1) I am able to run the same command (C:\Program Files\Git\bin\git.exe fetch --tags --progress https://xxx@bitbucket.org/xxx/test.git +refs/heads/:refs/remotes/release/) in same location (Jenkins workspace) - It's successfully fetching remote repo.
2) Jenkins able to fetch and download public repo content.
3) This is first time setup with all updated plugins as,
Git plugin - 3.3.1 Git client plugin - 2.4.6 Credentials plugin - 2.1.13
Jenkins - 2.59I don't think up what else can be there, because of it jenkins not able to run commands?
can someone please help!
-
Checklist of things that may fail:
- The plugin version
- Wrong Password
- Special Characters in the password (here and here)
- Have you tried changing the protocol? Instead of https go for git:// or ssh://
- Have you updated the plugin recently?
- Have you tried a downgrade of the plugin?
- Have you updated both, Git Plugin and Git Client Plugin?
EDIT:
- Solution: Have you tried with a different repo?
- Meet101 2017-06-27 20:04 I am using Git plugin 3.3.0 and credentials plugin 2.1.13. I am sure password is correct as i updated password couple of times to make sure it. I have special character in my password "parenthesis". Do you think it can be issue?
- Meet101 2017-06-27 20:36 I have updated my repo password and removed special character. Still getting same error.
- Meet101 2017-06-28 17:03 I have tried with http and ssh both. Getting same error. I am trying this setup first time. So, using this plugin first time. Jenkins version - 2.59, Git plugin - 3.3.0 and Credntials plugin - 2.1.13
- Miguel Ortiz yo 2017-06-28 17:05 Did you updated the git client version? wiki.jenkins.io/display/JENKINS/Git+Client+Plugin
- Meet101 2017-06-28 17:13 I just noticed, i don't have git client plugin installed. I install it and kick off the build. still same error. For SSH. i am getting another error, Git is not identifying the repo URL for ssh. After installing Git client plugin, Do i need to configure anything for that plugin?
- Miguel Ortiz yo 2017-06-28 18:30 I just mentioned Git client if you were doing things with git within your job. Could you try creating a new private repo in bitbucket (an empty one, maybe with one file) and fetch from there?
- Meet101 2017-06-28 19:27 Yes, You are correct. After installing Git client plugin. I was trying with old repository and that was the issue. I created new repo and it worked. Thanks a lot....