How to use Git-LFS with a self hosted mac runner?
Asked by Duncan Tyrell:

Hello,

I am having the following issue.

#### 1. git lfs install output in bash shell {#toc-hId-286708820}

```
bash-3.2$ git lfs install
Git LFS initialized.
```

#### Same as ZSH shell {#toc-hId--1520745643}

```
% git lfs install
Git LFS initialized.
```

#### 2. LFS version in the pipeline step with clone: lfs: false {#toc-hId-966767190}

Note: this output is identical to what I see on the bash shell

![Screenshot 2023-10-11 at 19.31.40.png](https://community.atlassian.com/t5/image/serverpage/image-id/285728i16EDAA80A781645D/image-size/large?v=v2&px=999 "Screenshot 2023-10-11 at 19.31.40.png")

#### 3. Runner Specs {#toc-hId--840687273}

2018 Mac Mini - 3 GHz 6-Core Intel Core i5

JDK: openjdk 17.0.8.1 2023-08-24

Git Version: 2.37.1

RAM: 16GB

macOS Version: 12.6.1

#### 4. Runner Log {#toc-hId-1646825560}

```
[2023-10-11 19:27:28,784] Tearing down directories.
[2023-10-11 19:27:28,786] Cancelling timeout
[2023-10-11 19:27:28,787] Completing step with result Result{status=FAILED, error=Some(Error{key='runner.git.git-lfs-not-installed', message='Git LFS must be installed in order to use it in bitbucket-pipelines.yaml.', arguments={}})}.
[2023-10-11 19:27:29,041] Setting runner state to not executing step.
[2023-10-11 19:27:29,041] Waiting for next step.
```

#### 5. Runner version {#toc-hId--160628903}

The latest at the time of writing: 1.509

#### The Problem {#toc-hId--1968083366}

This step passes:  

```
?custom:
   Test Git LFS:
     - step:
     runs-on: *mobile-macos
     name: 'Test Git LFS'
     clone:
       lfs: false
       enabled: false
     script:
       - git lfs version
       - git-lfs version
```

This one fails in setup before it even starts at the lfs check

```
 steps:
   - step: &build-test
     clone:
       lfs: true
     name: Build and test
     runs-on: *mobile-macos
```

![Screenshot 2023-10-11 at 19.47.34.png](https://community.atlassian.com/t5/image/serverpage/image-id/285734i1A8D928346260480/image-size/large?v=v2&px=999 "Screenshot 2023-10-11 at 19.47.34.png")

Snippet from .bashrc

```
export PATH="$PATH:/usr/local/bin"

# homebrew
eval "$(/usr/local/bin/brew shellenv)"???
```


Answers:
author: Theodora Boudale
body: Hi [@Duncan Tyrell](/t5/user/viewprofilepage/user-id/5057652),

Thank you for reaching out and for the info you have provided. Just a heads up, I moved your post to a new question. Please create a new question if you need assistance, as an existing question may become difficult to follow if we try to troubleshoot multiple users' issues.

I will reach out to the development team for input and I will get back to you.

Kind regards,  
Theodora

comments: author: Theodora Boudale
body: Hi Duncan,

Can you please confirm if both steps (the one with clone: lfs: false and the one with clone: lfs: true) run on the same runner and on the same Mac?

If so, I can create a support ticket on your behalf for this issue for further investigation.

You can also create a ticket yourself if you prefer that. You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

Kind regards,  
Theodora


author: Duncan Tyrell
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) I can confirm they are both run on the same machine, as we currently have only one macOS runner configured. I will raise the ticket.


Tags: bitbucket-cloud

cloud