Using a basic pipeline
image: atlassian/default-image:3
pipelines:
default:
- parallel:
- step:
runs-on:
- self.hosted
- linux
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
```
The pipeline fails to clone the repository.
With further investigation into the clone container, it seems that the variable BITBUCKET_REPO_FULL_NAME is empty, as a result it fails to clone.
I've tried setting it as "Repository variables" with out any luck.
Any other suggestions for a fix? This looks like a bug!
Hi @Tarlabs.
Welcome to the Community!!
May I know the git version you are running on a self-hosted runner?
Also, can you try the SSL Skip and check once
https://support.atlassian.com/bitbucket-cloud/docs/configure-your-runner-in-bitbucket-pipelines-yml
Thanks,
Pramodh
docker run -it docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-dvcs-tools:prod-stable bash
bash-4.4# git --version
git version 2.15.4
If the BITBUCKET_REPO_FULL_NAME variable isn't passed into the container then git doesn't know where to go.
This is the error that the container gets:
bash-4.4# GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="main" --depth 1 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into 'bitbucket.org'...
remote: The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated.
fatal: repository 'https://x-token-auth:@bitbucket.org/.git/' not found
Attempt 1 of 6 failed.
Retrying in 1 seconds
Cloning into 'bitbucket.org'...
remote: The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated.
fatal: repository 'https://x-token-auth:@bitbucket.org/.git/' not found
Notice the 'https://x-token-auth:@bitbucket.org/<this part is missing>.git/'
bash-4.4# echo $BITBUCKET_REPO_FULL_NAME
bash-4.4#
If I set the above variable it can clone the repo.
I should say that the runner is added at the workspace level and I presume that is why it doesn't know what repo it should be downloading.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What kind of server do you use for runner - on-premise or cloud ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.