Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,490
Community Members
 
Community Events
165
Community Groups

How to access private bitbucket repository from docker composer?

Hi!

How to access private bitbucket repository from docker composer? I missing help or example.

Thanks!

1 answer

0 votes
Caroline R Atlassian Team Oct 19, 2021

Hi, @Dusan Schiffel

Thank you for reaching out to Atlassian Community!

The best option in this case is to use HTTPS with the password built into the clone command:

git clone https://$username:$apppassword@bitbucket.org/<workspace>/<repo>/

As you are using Pipelines, you can set $username and $apppassword as secured environment variables and it should work. A secure variable can be used in your scripts but its value will be hidden in the build logs. If you want to edit a secure variable, you can only give it a new value or delete it.  Secure variables are stored as encrypted values. 

You can follow the next steps to set them:

  • Open your repository > Repository settings

  • Open Repository variables

  • Add the name and the value and mark the Secured option > Click Add

In case you would like to read more about variables, you can access the following documentation: 

I hope this helps, but do let me know if you have any questions. 

Kind regards,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,229 views 2 9
Read article

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