I'm looking for a way to download some git LFS zip files I have in a repo without having to checkout the entire repository.
I have tried the following:
curl -L <URL to the file RAW download on github page>
curl -L <URL from .lfsconfig file + object ID from the file's pointer information in git repo>
More example tries:
curl -L https://gitlfs.es.com/api/company/myrepository/content/framework/7d5dfcf764118df4867dc676b615e1ee4bf67e5b37fd56275f8845d
curl -L https://gitlfs.es.com/api/company/myrepository/7d5dfcf764118df4d188d5838867dc676b615e1ee4bf67e5b37fd56275f8
curl -L https://gitlfs.es.com/api/company/myrepository/sha256:7d5dfcf764118df4d188d5838867dc676b615e1ee4bf67e5b37fd56275f8845d
None of the above seems to work
Any leads will be appreciated.
Git LFS stores the binary file content on a custom server or via GitHub, GitLab, or BitBucket's built-in LFS storage. To find the binary content's location, look in your repository's . git/lfs/objects folder.
Once Git LFS is installed, you can clone a Git LFS repository as normal using git clone . At the end of the cloning process Git will check out the default branch (usually main ), and any Git LFS files needed to complete the checkout process will be automatically downloaded for you.
If the repository is private then you need to pass either Gitlab authorization token or account authentication credentials in curl command.
You may find links below useful:
https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-repository https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With