see https://github.com/github/git-lfs/issues/640 and https://git-lfs.github.com/
This is scoped to just github lfs support. In short, we need to preform git lfs fetch after get fetch (to be exact after git update-ref). We might need a knob directive to explicitly tell us to do that (eg. appSettings SCM_GIT_LFS_FETCH = 1).
To get the git lfs command extension, we need to have git lfs plugin installed.
This would be awesome! Can you please add support for this? It seems like it would be a pretty small change and a big win especially in the .net community where we are deploying assemblies.
+1
If you have a public repo exercising lfs, please share with us. Once we add support, we can verify against it.
Also, this probably won't work with libgit2sharp till https://github.com/libgit2/libgit2sharp/issues/1236 is fixed.
Yeah, we'd be more than happy to give you access to our build repo. When the time comes could you send me a private message in our gitter (https://gitter.im/exceptionless/Discuss)
@niemyjski: @suwatch was referring to some minimal public repo. e.g. it can be literally a trivial repo that pulls in a single file via lfs.
Sorry for not being clear. I have the trivial repo that I used for testing basic LFS. I just want more coverage with one from real users to get us more confident on the support. If you have a private repo, then we will likely to ask you to test for us etc.
GitHub supports LFS on all of their repos.
FYI: this is my trivial one when I played around with it a couple of month ago. (https://github.com/suwatch/lfstest).
When I go to https://git-lfs.github.com/ and click the Download button, I get a 404. That's not a good sign!
Ok, the links from https://github.com/github/git-lfs/releases/tag/v1.1.1 seem to work. e.g. the Windows installer is https://github.com/github/git-lfs/releases/download/v1.1.1/git-lfs-windows-1.1.1.exe.
So does that mean it can be supported in Kudu?
Probably, it could be made to work. I this point I just wanted to try it locally on my machine as I have not used it before.
Note that in the meantime, you may be able to make this work using a custom deployment script.
Good news: we now have some preliminary support for this. There are a couple manual steps, but it's pretty easy to set up. To the following:
SCM_USE_LIBGIT2SHARP_REPOSITORY=0. This is necessary because libgit2sharp doesn't support lfs yet: https://github.com/libgit2/libgit2sharp/issues/1236git-lfs.exe into your D:\home\site\deployments\tools folder. You can get it from here. e.g. download the Windows 386 zip. Eventually we'll get it installed on the VM, but for now it's bring-your-own.And that's it, lfs should just work! Please let us know how this works for you.
Awesome! Thank you. I will give this a try.
Do you know if git-lfs.exe is included in the VM image now?
Not yet. First, we'd like to validate whether steps above are functional for everyone.
Unfortunately not working for me.
git-lfs/1.4.4 (GitHub; windows 386; go 1.7.3; git cbf91a9)
git version 2.8.1.windows.1
$ git-lfs.exe smudge data/corpora/stopwords/README
Error downloading object: data/corpora/stopwords/README (abc88589ff9db0518feec1f3127e2cec915adcd12d994cf3427fcadc2370197b)
Smudge error: Error buffering media file: Object not found on the server.:
github.com/github/git-lfs/errors.newWrappedError
c:/go/src/github.com/github/git-lfs/errors/types.go:166
github.com/github/git-lfs/errors.NewSmudgeError
c:/go/src/github.com/github/git-lfs/errors/types.go:252
github.com/github/git-lfs/lfs.PointerSmudge
c:/go/src/github.com/github/git-lfs/lfs/pointer_smudge.go:69
github.com/github/git-lfs/lfs.(*Pointer).Smudge
c:/go/src/github.com/github/git-lfs/lfs/pointer.go:64
github.com/github/git-lfs/commands.smudgeCommand
c:/go/src/github.com/github/git-lfs/commands/command_smudge.go:66
github.com/github/git-lfs/vendor/github.com/spf13/cobra.(*Command).execute
c:/go/src/github.com/github/git-lfs/vendor/github.com/spf13/cobra/command.go:477
github.com/github/git-lfs/vendor/github.com/spf13/cobra.(*Command).Execute
c:/go/src/github.com/github/git-lfs/vendor/github.com/spf13/cobra/command.go:551
github.com/github/git-lfs/commands.Run
c:/go/src/github.com/github/git-lfs/commands/run.go:65
main.main
c:/go/src/github.com/github/git-lfs/git-lfs.go:33
runtime.main
c:/go/src/runtime/proc.go:183
runtime.goexit
c:/go/src/runtime/asm_386.s:1612
ENV:
LocalWorkingDir=D:\home\site\repository
LocalGitDir=D:\home\site\repository\.git
LocalGitStorageDir=D:\home\site\repository\.git
LocalMediaDir=D:\home\site\repository\.git\lfs\objects
LocalReferenceDir=
TempDir=D:\home\site\repository\.git\lfs\tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
BatchTransfer=true
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic
UploadTransfers=basic
GIT_DIR=.git
GIT_PREFIX=
Any ideas?
Are there any news on this? I have problems with deploying LFS files, getting this error:
Git LFS: (0 of 1 files) 0 B / 132.38 KB
batch response: Unable to parse HTTP response for POST https://myapp.scm.azurewebsites.net:443/myapp.git/info/lfs/objects/batch: json: cannot unmarshal string into Go value of type lfsapi.ClientError
error: failed to push some refs to 'https://myapp.scm.azurewebsites.net:443/myapp.git'
I used Kudu deployment from github, which "worked" except it had raw LFS text pointers instead of my images. In the Kudu debug console I ran git lfs fetch in the repository, then copied the LFS files back to wwwroot, and then the site worked correctly. The downside to this manual strategy is after each github commit is synced, the LFS pointers would come back.
It seems like it should be easy to add an option to restore LFS files (or just always restore?), in the same way that Azure DevOs builds has. In the end, I ended up using DevOps to set up CD (also, I wanted to run tests).
Most helpful comment
Are there any news on this? I have problems with deploying LFS files, getting this error:
Git LFS: (0 of 1 files) 0 B / 132.38 KB batch response: Unable to parse HTTP response for POST https://myapp.scm.azurewebsites.net:443/myapp.git/info/lfs/objects/batch: json: cannot unmarshal string into Go value of type lfsapi.ClientError error: failed to push some refs to 'https://myapp.scm.azurewebsites.net:443/myapp.git'