[JIRA] (JENKINS-48897) Cannot add credentials for Bitbucket on branch sources section in Multibranch pipeline

10 views
Skip to first unread message

bastianbrodbeck@googlemail.com (JIRA)

unread,
Apr 27, 2018, 10:45:02 AM4/27/18
to jenkinsc...@googlegroups.com
Bastian Brodbeck commented on Bug JENKINS-48897
 
Re: Cannot add credentials for Bitbucket on branch sources section in Multibranch pipeline

Hi, I have the same issue. While the initial setup with username/password through blue ocean works for detecting branches it does not work when actually running a build.

I am not able to add proper credentials with ssh key as described above. And builds won't even start with username/password credentials on my private BitBucket Cloud repositories.

using GIT_ASKPASS to set credentials
> /usr/bin/git fetch --no-tags --progress https://bitbucket.org/me/my-fancy-fake-repo.git +refs/heads/master:refs/remotes/origin/master
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'

if i set it up a generic git then i can add an ssh key and the build runs fine. But i won't be able to "discover Pull Requests from origin".

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

brian@derocher.org (JIRA)

unread,
Aug 17, 2018, 9:23:02 AM8/17/18
to jenkinsc...@googlegroups.com

I have this issue too.

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

w@rren.co.uk (JIRA)

unread,
Dec 19, 2018, 10:52:02 AM12/19/18
to jenkinsc...@googlegroups.com

Any progress on this? I'm just attempting to switch from standard git to using the bitbucket-branch-source plugin so I can build PRs and I'm facing this issue too. Username not being passed?

 

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

nataliemona@g.harvard.edu (JIRA)

unread,
Jan 4, 2019, 2:16:03 PM1/4/19
to jenkinsc...@googlegroups.com

I have this issue too. Can only use username/password credentials for Bitbucket Branch Source Plugin but I would like to use SSH. I can use SSH with git source, but I want the features of the Bitbucket Branch Source Plugin.

nataliemona@g.harvard.edu (JIRA)

unread,
Jan 4, 2019, 2:31:03 PM1/4/19
to jenkinsc...@googlegroups.com
Natalie Matthews edited a comment on Bug JENKINS-48897
!Screen Shot 2018-01-11 at 14.11.34.png|thumbnail!


I have this issue too. Can only use username/password credentials for Bitbucket Branch Source Plugin but I would like to use SSH. I can use SSH with git source, but I want the features of the Bitbucket Branch Source Plugin.

nataliemona@g.harvard.edu (JIRA)

unread,
Jan 4, 2019, 2:31:05 PM1/4/19
to jenkinsc...@googlegroups.com

nataliemona@g.harvard.edu (JIRA)

unread,
Jan 4, 2019, 2:32:02 PM1/4/19
to jenkinsc...@googlegroups.com
Natalie Matthews updated an issue
 
Jenkins / Bug JENKINS-48897
Change By: Natalie Matthews
Attachment: Screen Shot 2019-01-04 at 2.17.52 PM.png
Attachment: Screen Shot 2019-01-04 at 2.18.04 PM.png
Attachment: Screen Shot 2019-01-04 at 2.17.29 PM.png

nataliemona@g.harvard.edu (JIRA)

unread,
Jan 4, 2019, 2:32:03 PM1/4/19
to jenkinsc...@googlegroups.com
Natalie Matthews edited a comment on Bug JENKINS-48897
 
Re: Cannot add credentials for Bitbucket on branch sources section in Multibranch pipeline
!Screen Shot 2019-01-04 at 2.17.29 PM.png|thumbnail!
!Screen Shot 2019-01-04 at 2.17.52 PM.png|thumbnail!
!Screen Shot 2019-01-04 at 2.18.04 PM.png|thumbnail!


I have this issue too. Can only use username/password credentials for Bitbucket Branch Source Plugin but I would like to use SSH. I can use SSH with git source, but I want the features of the Bitbucket Branch Source Plugin.

nataliemona@g.harvard.edu (JIRA)

unread,
Jan 4, 2019, 2:33:02 PM1/4/19
to jenkinsc...@googlegroups.com
Natalie Matthews edited a comment on Bug JENKINS-48897
Here you can see that I have SSH credentials set up.
!Screen Shot 2019-01-04 at 2.17.29 PM.png|thumbnail!
They show up when I use Git as a source.
!Screen Shot 2019-01-04 at 2.17.52 PM.png|thumbnail!
They do not show up when I use Bitbucket as a source !
!
Screen Shot 2019-01-04 at 2.18.04 PM.png|thumbnail!


I have this issue too. Can only use username/password credentials for Bitbucket Branch Source Plugin but I would like to use SSH. I can use SSH with git source, but I want the features of the Bitbucket Branch Source Plugin.

eshepelyuk@gmail.com (JIRA)

unread,
Jan 10, 2019, 9:28:02 AM1/10/19
to jenkinsc...@googlegroups.com

ivan.nieto.sousa@gmail.com (JIRA)

unread,
Feb 15, 2019, 11:39:02 AM2/15/19
to jenkinsc...@googlegroups.com

ivan.nieto.sousa@gmail.com (JIRA)

unread,
Feb 15, 2019, 11:40:02 AM2/15/19
to jenkinsc...@googlegroups.com
Ivan Nieto edited a comment on Bug JENKINS-48897
This is essential, any updates? I can replicate the issue as well. :|

eshepelyuk@gmail.com (JIRA)

unread,
Feb 15, 2019, 11:42:01 AM2/15/19
to jenkinsc...@googlegroups.com

Ivan Nieto this is not an issue but rather lack of documentation.
You can later configure SSH for fetching your code but not from this screen. Since this credentilas are used to scan Bitbucket via REST API, so on e is forecd to use login / password in this case.

eshepelyuk@gmail.com (JIRA)

unread,
Feb 15, 2019, 11:44:02 AM2/15/19
to jenkinsc...@googlegroups.com
Evgeny Shepelyuk edited a comment on Bug JENKINS-48897
[~ivannieto] this is not an issue but rather lack of documentation.
You can later configure SSH for fetching your code but not from this screen. Since this credentilas are used to scan Bitbucket via REST API, so on e is forecd to use login / password in this case.


!image-2019-02-15-18-41-45-586.png!

eshepelyuk@gmail.com (JIRA)

unread,
Feb 15, 2019, 11:45:02 AM2/15/19
to jenkinsc...@googlegroups.com
Evgeny Shepelyuk edited a comment on Bug JENKINS-48897
[~ivannieto] this is not an issue but rather lack of documentation.
You can later configure SSH for fetching your code but not from this screen . Since , because this credentilas credentials are used to scan Bitbucket via REST API, so on e one is forecd forced to use login / password in this case authentication .

Go to configuration of multibranch pipeline and setup checkout policy via SSH.

!image-2019-02-15-18-41-45-586.png!

ivan.nieto.sousa@gmail.com (JIRA)

unread,
Feb 15, 2019, 12:08:02 PM2/15/19
to jenkinsc...@googlegroups.com

morten@aparte-consulting.no (JIRA)

unread,
Aug 8, 2019, 8:41:05 AM8/8/19
to jenkinsc...@googlegroups.com

Hi, thanks for clearing this out. But that solves only parts of it doesn't it? Why are you not allowed to use SSH credentials in "Credentials" part? I am currently using the plugin (which is awsome!) and I am using the "Bitbucket Team/Project" job. And I would like to use SSH all over. Why the limitation?

Kalle.Niemitalo@procomp.fi (JIRA)

unread,
Aug 8, 2019, 8:46:04 AM8/8/19
to jenkinsc...@googlegroups.com

Because Bitbucket Server does not support SSH credentials for actions such as retrieving Jenkinsfile (without cloning the whole repository) and reporting the build status.

jayshanbhdg@gmail.com (JIRA)

unread,
Sep 17, 2019, 4:56:02 AM9/17/19
to jenkinsc...@googlegroups.com

youssef.elhouti@gmail.com (JIRA)

unread,
Sep 20, 2019, 6:36:02 AM9/20/19
to jenkinsc...@googlegroups.com

I also would ruther use ssh access token as mentionned. Kalle Niemitalo are you sure this not possible?

Kalle.Niemitalo@procomp.fi (JIRA)

unread,
Sep 20, 2019, 7:51:02 AM9/20/19
to jenkinsc...@googlegroups.com

Youssef El Houti, if the REST APIs of Bitbucket Server support SSH authentication, https://docs.atlassian.com/bitbucket-server/rest/6.6.0/bitbucket-rest.html#authentication does not describe how to use it over HTTP. Also, https://confluence.atlassian.com/bitbucketserver/ssh-user-keys-for-personal-use-776639793.html talks about using SSH keys for Git operations and does not mention any way to use them for other operations.

I can imagine a few ways for Atlassian to allow SSH authentication for REST APIs in some future version of Bitbucket Server:

  • Provide a command that can be run over SSH to retrieve a temporary token for the REST APIs, similar to git-lfs-authenticate.
  • Use the SSH keys in the experimental HTTP Origin-Bound Authentication (HOBA) scheme specified in RFC 7486. Atlassian could either implement that directly in Bitbucket Server or implement BSERV-3239 and let someone else implement HOBA for Tomcat or Apache.

I did not find any requests for such features at jira.atlassian.com, though.

Reply all
Reply to author
Forward
0 new messages