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

BITBUCKET_GIT_SSH_ORIGIN variable not set on Windows

Hello,

I'm trying to configure build using bitbucket pipelines on self-hosted Windows machine. 

However, I can't access SSH repository URL via "BITBUCKET_GIT_SSH_ORIGIN" variable like in this example:

git remote set-url origin ${BITBUCKET_GIT_SSH_ORIGIN}
I tried "git remote set-url origin $BITBUCKET_GIT_SSH_ORIGIN" and also "echo BITBUCKET_GIT_SSH_ORIGIN". The latter command was supposed to print git repository SSH url but it didn't. 
It looks like this variable is not defined for Windows. I managed to workaround this by setting SSH url directly in the bitbucket-pipelines.yml file. 
Has anyone experienced the same issue? Is there a way to access SSH url on Windows?
Thanks in advance.

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 19, 2022

Hi @AlexanderS,

Windows Runners use PowerShell and environment variables in PowerShell can be accessed with $env:variable_name. So, you can access this variable with $env:BITBUCKET_GIT_SSH_ORIGIN

Please feel free to let me know if this works for you and if you need anything further.

Kind regards,
Theodora

It works, thanks a lot!

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 19, 2022

That's good to hear, you are very welcome!

Please feel free to reach out if you ever need anything else.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events