actions / checkout

Action for checking out a repo
https://github.com/features/actions
MIT License
5.92k stars 1.75k forks source link

Checkout not respecting .lfsconfig #365

Open CEbbinghaus opened 4 years ago

CEbbinghaus commented 4 years ago

When Cloning a Repository that uses a third party lfs server it still tries to pull from github's lfs

Action:

- name: Checkout repository
  uses: actions/checkout@v2
  with:
    lfs: true
    ref: Release

.lfsconfig:

[remote "origin"]
    lfsurl = /*Remote url*/

output:

fetch: Fetching reference refs/remotes/origin/Release
..
..
Error: error: failed to fetch some objects from '/*Repository Url*/'

It would be nice if either a Settings for the lfs-url were to be exposed or it would simply read the .lfsconfig file and use the provided one. 👍

arihannu commented 3 years ago

For our project this is major issue, since when checking out to an empty workspace, .lfsconfig file does not yet exist and lfs fetch then fails to find the files (since it looks them from the wrong server). However, we just stopped using lfs: true and we do git lfs pull after checkout.

slietzau commented 1 year ago

This is a major problem for us. Would a contribution to fix this be welcome?

dbushell commented 4 months ago

I was suprised to run into this issue. I found a workout if you remove:

with:
  lfs: true

Then add a second step:

- name: Checkout LFS
  run: git lfs fetch --all && git lfs checkout

Possible just git lfs pull would suffice. I found this respects the .lfsconfig file (it worked for my action). I'm guessing it'd also respect the .git/config [lfs] config if that were edited inside the action runner.

I orignally added sudo apt install -y git-lfs but it was already installed.