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

how to pull latest code of bitbucket private repo into server using https

Pradip Solace May 10, 2023

I have tried using access token, generating one and adding to my jenkins, but it gives me error as "cannot read password for username" now what is the reason for this?

I have already tried transferring this repo into different account and trying to pull latest changes from there, but still it refers to original repo and gives me same error

please can anyone help me in this?

2 answers

0 votes
jennifer.dempsey_Appfire
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 15, 2023

Hi @Pradip Solace 

You might want to also consider using an integration app like Webhook to Jenkins for Bitbucket  which is now available for Cloud! This app from Appfire is easy to set up and will allow you to automatically trigger Jenkins builds when committing or merging code.

Please feel free to reach out to me at Jennifer.Dempsey@appfire.com if I can answer any questions about the app for you. You can also contact our awesome support team to ask questions about the product or request a demo.

Cheers,
Jennifer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 11, 2023

Hello @Pradip Solace ,

Thank you for reaching out to Atlassian Community!

From your description and the error message, I suspect the issue is related to how the authentication was setup on the Jenkins side. Since you mentioned to be currently trying with an access token, I would suggest trying basic authentication instead and checking if the issue persists. For that, you would have to configure the credentials in Jenkins as follows:

  • username : your bitbucket account username. You can find your username by accessing the Personal settings of your account (https://bitbucket.org/account/settings/
  • AppPassword : is used to authenticate git operations and API calls. You can create an app password and use it as the password in your Jenkins configuration. 

You can try the suggestion above and let us know how it goes.

Thank you, @Pradip Solace !

Patrik S

Pradip Solace May 12, 2023

hello @Patrik S 

thanks for your reply!
As i can see from your reply you want me to try using username and app password generated from bitbucket.

I have already tried this method, but it still gives me same error

"fatal: could not read Password for: 'https://username@bitbucket.org': No such file or directory".

Is anything related to app authorization has to be implemented for this?
kindly let me know

Thanks 

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 15, 2023

Hello @Pradip Solace ,

The error message seems to be related to a local configuration on Jenkins.

As you are trying to integrate Bitbucket Cloud with your Jenkins instance, I would suggest using the Bitbucket Jenkins plugin below :

This plugin relies on bitbucket webhooks to receive the events that happen in your repository, such as a new push, to then trigger an event in your Jenkins instance.

Also, the following article has step-by-step instructions on how to setup this integration : 

Let me know in case you have any questions.

Thank you, @Pradip Solace !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events