Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to access private bitbucket repository from docker composer?

Dusan Schiffel October 14, 2021

Hi!

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

Thanks!

1 answer

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 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
AUG Leaders

Atlassian Community Events