Bitbucket stopped respoding to jenkins request

Angel July 6, 2020

Hello everybody.. I am currently making a Jenknis server and I am having trouble connecting to bitbucket. As i'm developing a jenkinsfile i made multiple commits that triggered a hook in Bitbucket and jenkins was able to download the source files and run the job.. due to some additional steps i had to play with credentials. So this is the problem.

When I try to connect to a bitbucket repo in order to download the Jenkinsfile(from the configuration window of the Jenkins job) i could no longer establish connection with the same credentials i used to before. the error is this(from jenkins job 'pipeline script from SCM' field):

Failed to connect to repository : Command "git ls-remote -h -- https://bitbucket.mycompany.com/scm/sf/project.git HEAD" returned status code 128:
stdout:
stderr: fatal: Authentication failed for 'https://bitbucket.mycompany.com/scm/sf/project.git

And i can still successfully login to bitbucket with the same credentials.. when the job is triggered by the web hook(bitbucket ----> Jenkins: HTTP response 200 .. alll good) but when jenkins try to checkout the Jenkinsfile and project, i see no information regarding the commit message and the job fails with the following error: 

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- https://bitbucket.mycompany.com/scm/sf/project.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: fatal: Authentication failed for 'https://bitbucket.mycompany.com/scm/sf/project.git'

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2436)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2050)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:572)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:801)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1132)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1177)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:155)
	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:69)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:428)
ERROR: Error cloning remote repo 'origin'
ERROR: Maximum checkout retry attempts reached, aborting
Finished: FAILURE

 And this used to work before... i wonder if there is some security reasons for the bitbucket to deny my access with a valid credentials

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events