[JIRA] [git] (JENKINS-24368) Authentication failed for https://username@bitbucket.org/project/repository.git

93 views
Skip to first unread message

flavio.donze@gmx.ch (JIRA)

unread,
Aug 21, 2014, 8:21:55 AM8/21/14
to jenkinsc...@googlegroups.com
Issue Type: Bug Bug
Affects Versions: current
Assignee: Nicolas De Loof
Components: git, git-client
Created: 21/Aug/14 12:20 PM
Description:

Getting the following error after updating
GIT plugin: 1.5.0 > 2.2.5
GIT client plugin: 1.3.0 > 1.10.1

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "C:/Progra~2/Git/bin/git.exe fetch --tags --progress https://user...@bitbucket.org/project/repository.git +refs/heads/:refs/remotes/origin/" returned status code 128:
stdout:
stderr: fatal: Authentication failed for 'https://user...@bitbucket.org/project/repository.git/'

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1407)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1195)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:266)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:422)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:857)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:890)
at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1255)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
at hudson.model.Run.execute(Run.java:1740)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:233)

Project: Jenkins
Priority: Major Major
Reporter: Flavio Donzé
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 21, 2014, 8:29:59 AM8/21/14
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-24368

I believe you'll need to switch from using the https://user...@bitbucket.org/ syntax to use a credential defined through "Manage Credentials" and the format https://bitbucket.org/ syntax.

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 21, 2014, 8:31:57 AM8/21/14
to jenkinsc...@googlegroups.com
 
Mark Waite edited a comment on Bug JENKINS-24368

I believe you'll need to switch from using the https://user...@bitbucket.org/ syntax to use a credential defined through "Manage Credentials" and the https://bitbucket.org/ syntax (without the username@ part).

flavio.donze@gmx.ch (JIRA)

unread,
Aug 21, 2014, 8:47:56 AM8/21/14
to jenkinsc...@googlegroups.com

Thanks for this workaround, but I need to use the username@host syntax.

dhwani.shah@synoverge.com (JIRA)

unread,
Aug 21, 2014, 9:12:56 AM8/21/14
to jenkinsc...@googlegroups.com
Dhwani Shah commented on Bug JENKINS-24368

I am also getting the same issue in version 1.576. What should i do connect with the bitbucket repository?

dhwani.shah@synoverge.com (JIRA)

unread,
Aug 21, 2014, 9:12:57 AM8/21/14
to jenkinsc...@googlegroups.com
 
Dhwani Shah edited a comment on Bug JENKINS-24368

I am also getting the same issue in version 1.576. What should i do to connect with the bitbucket repository in the latest version?

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 21, 2014, 2:01:57 PM8/21/14
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-24368

My technique was to define a credential through the "Manage Credentials" page in Jenkins administration, then reference that credential in the job definition and remove the "username@" portion from the https URL.

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 22, 2014, 7:43:56 AM8/22/14
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 6, 2014, 12:43:33 PM9/6/14
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-24368

I've found bitbucket authentication somewhat surprising and have described some of the interactions between private vs. public repositories and ssh vs. https URLs in JENKINS-24368. Unfortunately, all those investigations confirmed that I don't know how to access a private https based bitbucket git repository from the git plugin with either username / password or public key.

I can access a public https bitbucket git repository with username/password credentials.

I can access a private ssh bitbucket git repository with public key credentials.

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 6, 2014, 12:51:33 PM9/6/14
to jenkinsc...@googlegroups.com
 
Mark Waite edited a comment on Bug JENKINS-24368

I've found bitbucket authentication somewhat surprising and have described some of the interactions between private vs. public repositories and ssh vs. https URLs in JENKINS-24368. Unfortunately, all those investigations confirmed that I don't know how to access a private https based bitbucket git repository from the git plugin with either username / password or public key.

I can access a public https bitbucket git repository with username/password credentials.

I can access a public or a private ssh bitbucket git repository with public key credentials.

mark.earl.waite@gmail.com (JIRA)

unread,
Dec 25, 2014, 10:28:08 AM12/25/14
to jenkinsc...@googlegroups.com
Mark Waite closed Bug JENKINS-24368 as Fixed
Change By: Mark Waite (25/Dec/14 3:27 PM)
Status: Resolved Closed

mark.earl.waite@gmail.com (JIRA)

unread,
Dec 25, 2014, 10:28:08 AM12/25/14
to jenkinsc...@googlegroups.com
Mark Waite resolved Bug JENKINS-24368 as Fixed

The git-client-plugin 1.14.0 change to remove the call to JGit implementation of checkCredentials resolved this issue for me. I can clone from https://marke...@bitbucket.org/markewaite/bin.git, a private repository.

Change By: Mark Waite (25/Dec/14 3:27 PM)
Status: Open Resolved
Resolution: Fixed

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 20, 2015, 8:00:37 AM2/20/15
to jenkinsc...@googlegroups.com
Change By: Mark Waite (20/Feb/15 12:59 PM)
Resolution: Fixed
Status: Closed Reopened

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 20, 2015, 8:02:34 AM2/20/15
to jenkinsc...@googlegroups.com
 
Mark Waite edited a comment on Bug JENKINS-24368

The git-client-plugin 1.14.0 change to remove the call to JGit implementation of checkCredentials resolved this issue for me. I can clone from https://marke...@bitbucket.org/markewaite/bin.git, a private bitbucket repository using stored credentials as reported in JENKINS-22694.

With git plugin 2.3.5 and git client plugin 1.16.1, I cannot access a private bitbucket repository when the user name and password are embedded in the https URL. Refer to JENKINS-26757 for what appears to be a duplicate report.

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 20, 2015, 8:02:34 AM2/20/15
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 25, 2015, 7:58:31 PM2/25/15
to jenkinsc...@googlegroups.com
 
Mark Waite edited a comment on Bug JENKINS-24368

Credential based access to bitbucket repository works correctly. Embedded user name and password in the https URL does not work with bitbucket.

Embedded user name and password in the https URL works with other providers (like google code).

Reply all
Reply to author
Forward
0 new messages