Meet101
Meet101

Reputation: 801

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://[email protected]/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: FAILURE

Further research:

1) I am able to run the same command (C:\Program Files\Git\bin\git.exe fetch --tags --progress https://[email protected]/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.59

I don't think up what else can be there, because of it jenkins not able to run commands?

can someone please help!

Upvotes: 1

Views: 1459

Answers (1)

Miguel Ortiz
Miguel Ortiz

Reputation: 1482

Checklist of things that may fail:

EDIT:

  • Solution: Have you tried with a different repo?

Upvotes: 1

Related Questions