I have a two repositories.
When running the pipeline for the first repository, the bitbucket-pipelines.yml file in the default Step need to get a file from the second repository. The repos are in the same project.
This is the contents:
image: java:8
pipelines:
default:
- step:
caches:
- gradle
- maven
script:
- echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
- env
# Trying to do the same as Build Setup, but the $REPOSITORY_OAUTH_ACCESS_TOKEN is not available here
- export GRADLE_USER_HOME=$BITBUCKET_CLONE_DIR/gradle_user_home
- GIT_LFS_SKIP_SMUDGE=1 git clone --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/Project/other-repo.git $GRADLE_USER_HOME
As far as I can see, the $REPOSITORY_OAUTH_ACCESS_TOKEN is not available and therefore no access to the other repo.
How can this be solved?