Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout not respecting .lfsconfig #365

Open
CEbbinghaus opened this issue Oct 7, 2020 · 4 comments
Open

Checkout not respecting .lfsconfig #365

CEbbinghaus opened this issue Oct 7, 2020 · 4 comments

Comments

@CEbbinghaus
Copy link

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
Copy link

arihannu commented May 3, 2021

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
Copy link

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

@dbushell
Copy link

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.

@refringe
Copy link

refringe commented Dec 5, 2024

@dbushell I would highly recommend using pull instead:

- name: Checkout LFS
  run: git lfs pull

Running git lfs fetch --all will download all LFS objects for all branches and tags, not just the current branch, which could waste GB of really expensive LFS bandwidth.


As for the original issue, all I can say is that I too would like the .lfsconfig options supported. Specifically, the lfs.url option that allows you to define a custom LFS server:

[lfs]
    url = https://this-is-a.custom/lfs/server
    locksverify = false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants