Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to use Git-LFS with a self hosted mac runner?

Justin Saler
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!
February 21, 2023

Hello.

I have a self-hosted mac runner with git-lfs installed. The repo uses Git-LFS.  I have defined two pipelines

Get Repository:
- step:
name: 'Get Repository'
clone:
lfs: true
enabled: true
script:
- chmod +x ./scripts/buildScript.sh
- ./scripts/buildScript.sh
runs-on:
- 'self.hosted'
- 'macos
Test Git LFS:
- step:
name: 'Test Git LFS'
clone:
lfs: false
enabled: false
script:
- git lfs
- git-lfs
runs-on:
- 'self.hosted'
- 'macos

The second pipeline is able to run git-lfs and print out information, but the first pipeline fails during "Build Setup" with the following information:

Screenshot 2023-02-21 at 16.32.02.png

 

So for some reason Git LFS works in a step, but not in the build setup. 

For context, the mac runner has installed Git-LFS using Brew and I add Brew to the path in .bashrc using

eval "$(/opt/homebrew/bin/brew shellenv)"

 

What should I do to be able to use clone lfs: true? Is there any other file I should add the brew path? Should i install git-lfs some other way on the runner?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2023

Hi @Justin Saler and welcome to the community!

I am not able to reproduce the error you get with a configuration as your first step in the bitbucket-pipelines.yml file.

Could you please provide some additional info, so I can better help you?

1. What output do you get if you run git lfs install on a terminal on this Mac?

2. What is the version of Git LFS on this Mac? You can run git lfs version to find out.

3. Does this MacOS meet the minimum requirements for Runners below:

  • OpenJDK 11 (11.0.11 or newer) is installed
  • Git 2.35.0 and above
  • A 64-Bit MacOS instance with at least 8GB of RAM as a host for the runner.
  • MacOS Catalina 10.15+

4. Can you check the runner log and find entries at the time that this particular step failed and post them here (after sanitizing any private/sensitive data)?

5. What is the version of the Runner you are using? This should be in the Pipelines build log, in the first section, Runner.

Kind regards,
Theodora

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2023

A quick note I forgot to mention about question 4.:

The runner log should be located at

~/atlassian-bitbucket-pipelines-runner/temp/b609961f-891e-c872-c36b-f3f2c315d186/runner.log

where 

  • atlassian-bitbucket-pipelines-runner is the directory where you unzipped the runner zip
  • b609961f-891e-c872-c36b-f3f2c315d186 is the UUID of the runner, this should have the value of your own runner's UUID

Suggest an answer

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

Atlassian Community Events