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

Using Bitbucket Pipelines to Sync Git Repos with Password-based Access

Is there a way to use Bitbucket Pipes to sync a Bitbucket repo with an external git repo that only allows authentication with userid/password?  I can only find examples of doing this with key-based authentication. 

Presently Adobe Experience Cloud solutions host code in a git repo that they control, which only allows userid/password auth and not key-based auth. 

1 answer

1 vote

Hi @Tad Reeves  and welcome the community.

You can do this the following way:

1. Create variables for the username and password, either as repository variables (from the Repository settings page > Repository variables) or as workspace variables (from workspace Settings > Workspace variables), if you need those in more than one repo.

Make sure that you select the checkbox Secured when you create the variable for the password, so that it's not visible to anyone.

2. In your bitbucket-pipelines.yml file, you can include in the script a command that pushes to the repo:

git push https://${username}:${password}@hosting-provider/repo-owner/repo-name.git

 assuming that the variables were named username and password

Replace also the values for hosting-provider/repo-owner/repo-name with the appropriate ones for your repo.

The Docker image that you use for the step that does the push should have git installed already for this to work.

Is this something that works for you? Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

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

📹 Favorite Trello templates

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. In this video, I'll share my favorite Trello templates. Templates mentioned in ...

75 views 4 5
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