Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git LFS skipped files

Tags:

git

git-lfs

I'm actually working on moving my larges files to Git LFS. I have successfully pushed a set of files.

In a previous commit but I have created a new one with just one files and when I using git lfs push command I obtain this output:

Git LFS: (0 of 0 files, 1 skipped) 0 B / 6.53 KB

Hence, my file was skipped. Why?

like image 613
Damien Chesneau Avatar asked Aug 24 '16 08:08

Damien Chesneau


People also ask

Where do git LFS files go?

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.

Does GIT LFS Store history?

You should use Git LFS if you have large files or binary files to store in Git repositories. That's because Git is decentralized. So, every developer has the full change history on their computer.

Does GIT LFS have a limit?

GitHub has a file size limit of 100mb for a single file, and oftentimes in game development we may need to push files above this limit.

What is git LFS prune?

DESCRIPTION. Deletes local copies of LFS files which are old, thus freeing up disk space. Prune operates by enumerating all the locally stored objects, and then deleting any which are not referenced by at least ONE of the following: ○ the current checkout.


Video Answer


2 Answers

I've been back-and-forth with JFrog support, and some key info for the issue has been provided:

...it looks like you may have Anonymous Access enabled. If this is the case, then you are indeed running into this bug which is scheduled to be released by Q1 of this year in Artifactory 5.0.So far, the only workarounds from Artifactory’s end are to disable anonymous access completely or to have the git credentials stored in your git config file. For the latter solution, this will need to be done per user and repository, which may not be ideal depending on the amount of users and repos that use GitLFS. You can write to the config manually or temporarily disable anonymous access so that when a 401 is returned, LFS automatically writes to the config file.

Let me know if this needs more clarification, and I can add some more detailed steps to debug and solve the issue.

like image 200
tzrlk Avatar answered Sep 28 '22 21:09

tzrlk


In fact this turned out to be the error @Tzrlk described but this gives more information to diagnose for the end user.

trace git-lfs: HTTP: {
  "objects" : [ {
    "oid" : "d3e64a74919373d6d4d1d36bd717206584cb64cbb0532dfce3bc2081cba6817b",
    "size" : -1
  } ]
}

when running

GIT_TRACE=1 git push

This is the response from the server.

this is mentioned in issues such as https://github.com/git-lfs/git-lfs/issues/1364

it seem to suggest that the response is invalid.

This is a bug as described by @Tzrlk in his answer.

like image 40
JamesD Avatar answered Sep 28 '22 21:09

JamesD