Forums

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

Bitbucket pipeline is using the wrong variables

laurenceman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 19, 2018

I have a simple bitbucket pipeline config that looks like this:

pipelines:
  default:
    - step:
        script:
          - ./scripts/mirrorRepoAndTriggerBuild.sh
  # So that we can run the pipeline in the BB UI
  custom:
    trigger-build:
      - step:
          script:
            - ./scripts/mirrorRepoAndTriggerBuild.sh
 

That script is now failing on this line:

git clone --mirror https://$BITBUCKET_USER:$BITBUCKET_PASS@bitbucket.org/leadiq/leadiq-play.git

 Those are environment variables set in the repo. This script has worked up until the past week or so. Now, I'm getting this error in the pipeline:

+ ./scripts/mirrorRepoAndTriggerBuild.shCreating bare clone...Cloning into bare repository 'leadiq-play.git'...remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.fatal: Authentication failed for 'https://$BITBUCKET_USER:$GITLAB_PASS@bitbucket.org/leadiq/leadiq-play.git/'

 

Note that the wrong variables are being associated with that git clone command.

Can someone point me in the right direction here?

Thanks!

1 answer

0 votes
SebC
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2018

Hey @laurenceman,

you can now run pipelines from the UI without creating a custom pipeline; you can select a particular branch or tag to run instead.

If your $BITBUCKET_PASS and $GITLAB_PASS have the same value, when we do our variable masking we might be mis-labelling the password as the $GITLAB_PASS.

I would recommend using https://getsupport.atlassian.com to get help on this, as this could get tricky with log access / privacy.

Hope that helps,

Seb.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events