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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,560,234
Community Members
 
Community Events
185
Community Groups

How to set up workspace-wide SSH keys for Pipelines to fetch Golang modules located on Bitbucket?

Pedro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 06, 2021

Hi, 

I would like to understand how I can set up workspace-wide SSH keys for Pipelines to fetch Golang modules located on Bitbucket, please. 

Thank you!

1 answer

1 accepted

1 vote
Answer accepted
Leonardo M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 06, 2021 • edited

Hi!
Here are the steps to achieve this.

1. Create the ssh key in the pipeline settings for the repo (Repository settings > Pipelines > SSH Keys)

2. Copy the public key to the dependent repo access keys (Repository settings > Access keys)

3. Execute the following command in any context that will need to pull go dependencies. It tells git to rewrite https URLs to ssh URLs:

git config --global url."git@bitbucket.org:<workspaceID>".insteadOf "https://bitbucket.org/<workspaceID>"

4. Also execute the following:

export GOPRIVATE=bitbucket.org/<workspaceID>

This tells golang not to use the public checksum database for dependencies that use that URL.

@Leonardo M  how do you do the step 1 for all repo pipelines at single place, say at the workspace level. its a pain to manage the ssh keys at each pipeline level, we need it to be at the workspace or the project level. Even the envirnoment variables are not configurable/overridable at project level. are there anything for this?

don't work for me

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events