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,459,377
Community Members
 
Community Events
176
Community Groups

Git clone fail with self hosted runner on linux

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!

1 answer

0 votes
Pramodh M Community Leader Feb 19, 2022

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.

What kind of server do you use for runner - on-premise or cloud ?

Self hosted, meaning on-premise.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events