Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to connect bitbucket from Jenkins Edited

I have setup the application links for Jenkins from Bitbucket.

For the outgoing authentication, I have created a consumer from Jenkins with the plugin of "Manage Bitbucket Server consumers"

However, I have no idea what information is required and how to get them in order to configure the part of Incoming Authentication, especially the Consumer Key and public key. 

Besides, in the Bitbucket Server integration setting of Jenkins, I have inserted the personal access token generated by my bitbucket admin, however, the connection is still failed. 

 

2 answers

1 vote

Hello @Olivia Chow 

Welcome to the Atlassian Community...!!!

You can make use of this Add-on developed by Atlassian for a ease and smooth connection between bitbucket and jenkins.

https://marketplace.atlassian.com/apps/1222132/jenkins-integration-for-bitbucket-server?hosting=server&tab=overview

Document - https://plugins.jenkins.io/atlassian-bitbucket-server-integration/

Please check on the consumer key and shared secret on the application links detail page in Jenkins as same data needs to be copied on Bitbucket during the creation of application link

Thanks. 

I already create a personal access token from the Bitbucket and use the token to connect Bitbucket from Jenkins. However, it said the connection is failed. I am sure that the instance base URL of bitbucket is correct. It's very odd..

Besides, I capture a log message from the Bitbucket container which 10.176.x.x is the ip of my desktop and 172.19.0.26 is the internal ip of nginx-proxy-ssl. 

2021-01-07 17:07:43,485 WARN [http-nio-7990-exec-41] my_user_name_in_jenkins @SLDATYx1027x9557x0 1b19i56 10.176.x.x, 172.19.0.26 "GET /rest/applinks/3.0/status/1186df59-f2e4-34fc-95c2-245b77f5af0e HTTP/1.1" c.a.a.i.m.remote.TryWithCredentials You do not have an authorized access token for the remote resource.

It seems the problem is shown here but I have no idea about the cause and how to fix it. 

Thank you for the information. But I am not quite familiar what should I check on my nginx-ssl-proxy container based on the links you provided. 

In fact, my jra, bitbucket and confluence can successfully connected to each other with using hostname alias, e.g. https://jira.domain/.

Also, I have successfully tried to connect the Jenkins to Confluence and Jira with Confluence Publisher plugin (refer to Capture.PNG) and Jira plugin (refer to Capture2.PNG) with credential of username and password. 

So, it is so odd that only connection via personal access token is failure. 

 

Capture2.PNG

Capture.PNG

Thank you for the information. But I am not quite familiar what should I check on my nginx-ssl-proxy container based on the links you provided. 

In fact, my jra, bitbucket and confluence can successfully connected to each other with using hostname alias, e.g. https://jira.domain/.

Also, I have successfully tried to connect the Jenkins to Confluence and Jira with Confluence Publisher plugin (refer to Capture.PNG) and Jira plugin (refer to Capture2.PNG) with credential of username and password. 

So, it is so odd that only connection via personal access token is failure. 

 

Capture.PNGCapture2.PNG

Thank you for the information. But I am not quite familiar what should I check on my nginx-ssl-proxy container based on the links you provided. 

In fact, my jra, bitbucket and confluence can successfully connected to each other with using hostname alias, e.g. https://jira.domain/.

Also, I have successfully tried to connect the Jenkins to Confluence and Jira with Confluence Publisher plugin  and Jira plugin with credential of username and password. 

So, it is so odd that only connection via personal access token is failure. 

0 votes
Sandesh Shetty Community Leader Jan 07, 2021

@Olivia Chow 

May be this video link is helpful for you!!

kindly accept the answer if it is helpful!!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Posted in Bitbucket

Contest: Share your custom Bitbucket Pipe and win

Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more. One featur...

2,126 views 11 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you