Repository navigation
Closed
Labels
Description
When trying to pull from https://github.com/incf-nidash/nidmresults-examples, we get the following error:
$ git pull
Updating 17d5080..ff51e6d
Downloading spm_explicit_mask/explicit_mask_2.nii (579.34 KB)
Error accessing media: spm_explicit_mask/explicit_mask_2.nii (a543db67399ab02aefbf3dd2aad2f4e2980c9a026b657498c79f3573ac821952)
Errors logged to .git/lfs/objects/logs/20160112T102310.547408339.log
Use `git lfs logs last` to view the log.
error: external filter git-lfs smudge %f failed 2
error: external filter git-lfs smudge %f failed
fatal: spm_explicit_mask/explicit_mask_2.nii: smudge filter lfs failed
Full log:
$ git lfs logs last
git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1)
git version 2.6.3
$ git-lfs smudge spm_explicit_mask/explicit_mask_2.nii
Error accessing media: spm_explicit_mask/explicit_mask_2.nii (a543db67399ab02aefbf3dd2aad2f4e2980c9a026b657498c79f3573ac821952)
Post objects/batch: unsupported protocol scheme ""
goroutine 1 [running]:
github.com/github/git-lfs/lfs.Stack(0x0, 0x0, 0x0)
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/lfs/errors.go:557 +0x80
github.com/github/git-lfs/commands.logPanicToWriter(0xb641c0, 0xc820082228, 0xb64de0, 0xc82012a480)
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/commands/commands.go:184 +0xf7f
github.com/github/git-lfs/commands.logPanic(0xb64de0, 0xc82012a480, 0x0, 0x0)
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/commands/commands.go:148 +0x421
github.com/github/git-lfs/commands.handlePanic(0xb64de0, 0xc82012a480, 0x0, 0x0)
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/commands/commands.go:123 +0x4e
github.com/github/git-lfs/commands.LoggedError(0xb64de0, 0xc82012a480, 0x55a640, 0x1e, 0xc820127c98, 0x2, 0x2)
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/commands/commands.go:73 +0x82
github.com/github/git-lfs/commands.smudgeCommand(0x75e040, 0xc820071970, 0x1, 0x1)
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/commands/command_smudge.go:77 +0xd89
github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).execute(0x75e040, 0xc8200718c0, 0x1, 0x1, 0x0, 0x0)
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra/command.go:477 +0x403
github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra.(*Command).Execute(0x75f080, 0x0, 0x0)
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra/command.go:551 +0x46a
github.com/github/git-lfs/commands.Run()
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/src/github.com/github/git-lfs/commands/commands.go:88 +0x23
main.main()
/private/tmp/git-lfs20151202-15548-y7a9pj/git-lfs-1.1.0/git-lfs.go:34 +0x12e
ENV:
LocalWorkingDir=.
LocalGitDir=.git
LocalGitStorageDir=.git
LocalMediaDir=.git/lfs/objects
TempDir=.git/lfs/tmp
ConcurrentTransfers=3
BatchTransfer=true
GIT_DIR=.git
GIT_REFLOG_ACTION=pull
GIT_WORK_TREE=.
GIT_PREFIX=
Cloning the repository from scratch does work but the same issue re-appear when we try to pull again (the error is raised when the first file stored with git-lfs is pulled). Could you help us tracking this down? Thank you!
The repository contains a lot of files tracked with git-lfs. Might this be an issue?
Reacted by Jonas Malaco
Activity
cmaumet commentedon Jan 12, 2016
You will find below the output of git lfs env:
technoweenie commentedon Jan 12, 2016
Ah, I think it's because your ref is called "upstream", and not "origin". Easiest thing right now is to change it, but there's probably something better that Git LFS can do to support uncommon remote names. You may also have better luck specifying
git pull upstream master.cmaumet commentedon Jan 12, 2016
Thank you for this quick feedback!
git pull upstream masterraises the same error:But renaming
upstreamintooriginseems to solve the issue:technoweenie commentedon Jan 12, 2016
Cool, thanks for the confirmation. Does your git config have any relevant settings? Anything that sets
upstreamas your preferred default remote?cmaumet commentedon Jan 13, 2016
No... I have just changed the remote name manually using
git remote rename.c5f commentedon Jan 22, 2016
I also receive this error from remotes configured with a SSH config alias:
Changing the remote config to use
[email protected]:<user|org>/<repo>.gitsolved the issue for me, but I use thegithubSSH alias on most of my local projects.stoneStyle commentedon Jan 29, 2016
and i meet this bug when i try to add a subtree floder in my project;
at first i name that subtree project "configserver", so i receive the error ,then i rename it to origin,
it works....
DirkReiners commentedon Feb 6, 2016
+1 for the SSH config alias problem.
As a workaround we manually set the lfs.url for the repo, but it's a bit painful.
iacopy commentedon May 12, 2016
I also have the OP issue. Work-arounded succesfully by changing my remote name from
upstreamtoorigin:git remote rename upstream originygoe commentedon Aug 15, 2016
Please make the error message say "I'm stupid and you must name your remote 'origin' to use LFS." to help people resolve this error more quickly than I could just do it. Or fix the bug, whichever is easier.
technoweenie commentedon Aug 15, 2016
The reason LFS needs an origin remote for downloads is that by the time Git calls the
smudgefilter, the knowledge of what git remote should be used is lost. Your workarounds are either:origingit lfs install --skip-smudge. Now you'll have to rungit lfs pull {origin-name}to replace the LFS pointers with files. The downloads will be much faster, and you'll have more control over where your LFS content lives.ygoe commentedon Aug 15, 2016
Okay, but could you please try to make the error message helpful, because this limitation is far from obvious and people will raise that issue again as long as they're left clueless with that unsupported protocol scheme "", whatever that is. I, for one, don't usually use the name "origin" because I don't know where that is. I have many different repositories with different remotes, some internal, some public, and I'd like to be certain before I push anything somewhere. If specifying the LFS URL for the repository helps (haven't tried that yet), that might also be mentioned in the error message.
doudou commentedon Aug 24, 2016
I was going with the
--skip-smudgesolution ... but it is global, right ?I would like to be able to not touch the global setting, but set it while cloning. Once my repositorie's cloned, I can obviously set it up in the git configuration, but how can I force git-lfs to avoid smudging when I clone (regardless of the global setting)
technoweenie commentedon Aug 24, 2016
@doudou:
You can run
git lfs install --skip-smudge --localto apply to a repository's local git config.Use
git lfs clone .... It's a wrapper aroundgit clonethat disables smudging (regardless of your global git config), clones the repo, and then runsgit lfs pull. Highly recommended for all clones for Git LFS repositories.r0ssIV commentedon Apr 10, 2017
OMG, so much time passed, and nobody bothered with the bug
adiroiban commentedon Jun 23, 2017
I am getting this error when using git-lfs with Buildbot as it does not creates any remotes.
Setting lfs.url solved the issue
kavehv commentedon Jul 18, 2017
Why was this closed? I thought it was slated to be fixed in 2.2.x. It seems poor design to expect the remote to be named 'origin' in all cases and just blindly fail when it's not.
technoweenie commentedon Jul 18, 2017
Unfortunately, we're at the mercy of git's hooks here. We're open to suggestions on fixing it, but until then you can use the workaround described in #930 (comment).