Client: Git LFS - cannot push files on windows

Created on 12 Dec 2019  ·  26Comments  ·  Source: keybase/client

Hi!
I'm testing the new functionality from v5.1.0 - git LFS support.
I do everything what's said in doc (https://keybase.io/docs/git/index).
Everything is working for normal repo but when I try to push the LFS connected file I got an error:

git push
Initializing Keybase... done.
Syncing with Keybase... done.
Uploading LFS objects: 100% (1/1), 1.2 GB | 0 B/s, done
invalid character 'U' looking for beginning of value
error: failed to push some refs to 'keybase://team/xxx/Repo2'

Propably Uploading LFS objects part isn't done because it not take any time to upload file.

Is it a bug or maybe am I doing something wrong?

I'm on Windows 10.
My log id: 2dc714afb17faf0439897d1c

Thanks!

acked

Most helpful comment

Thanks all. I just got some testing in on a Windows device, and you'll never guess this one simple trick to getting it to work...

Instead of completely removing each \\\" from the .git/config file, you can change them into \". That solved it for me.

I swear I tested the current code in CMD before and got it to work, so I'll have to go back and try to figure out how to make it work automatically in the next release. Sorry for the inconvenience. Let me know if the above helps.

All 26 comments

I'm having this same problem, looks to me like the invalid character 'U' part is some failure looking for an encryption key or something like that.

What shell/command prompt are you both using on Windows?

Also, what exactly does this command show when you run it within your local checkout:

git config --get lfs.customtransfer.keybase-lfs.args

Thanks for trying out this new feature!

I was using git bash (which I believe is MINGw64)
that command returns
\"lfs origin keybase://team/[MYTEAMNAME]/[MYGITNAME]\"
What's in brackets is indeed correct and where I'm trying to send the files LFS uploads.

Ah hrm. Maybe you don't need the quotes on git bash. Can you edit your .git/config file to remove both \" from that option and see if it helps?

(I tested this in the normal command prompt I think.)

In the config file the "s have three slashes before them on either side.
\\\"lfs origin keybase://team/[MYTEAMNAME]/[MYGITNAME]\\\"
How much of this should be removed?

Oh sorry. Both sets of \\\" should be removed for the test.

No luck, still the invalid character 'U' error.

Hmm strange. The git config command above now shows it without any backslashes or quotes, right?

Also, what does this return:

git config --get lfs.customtransfer.keybase-lfs.path

I wonder if that contains backslashes or something else that the git shell can't handle.

Yeah the command from earlier now shows without slashes or quotes
git-remote-keybase
The new command outputs the above.

Ok thanks. I am stumped for now, this kind of thing is hard to debug. Maybe you put the \\\"s back and try it under regular command prompt, until I get the chance to test it myself? I don't often get time on a Windows machine.

I tried it already with git bash, PowerShell and normal CMD - the error is the same everywhere.

Oh right, I tried GitHub Desktop as well, same error there.

Thanks all. I just got some testing in on a Windows device, and you'll never guess this one simple trick to getting it to work...

Instead of completely removing each \\\" from the .git/config file, you can change them into \". That solved it for me.

I swear I tested the current code in CMD before and got it to work, so I'll have to go back and try to figure out how to make it work automatically in the next release. Sorry for the inconvenience. Let me know if the above helps.

That seems to have done it, LFS files are uploading now. Thanks a ton.

Yes that helps.
But I have another problem. :(
I have big (~5GB) repo and after uploading push hasn't finished.

I'm waiting already few hours but it seems stuck after:
Syncing with Keybase... done.

@ThePhxRises didn't you have such a problem?

Uploads are pretty slow. But if you do a keybase log send I can take a look and see what it's doing.

I leave it for the night and it hasn't finished. :(
Here is my log id: 280bee8fce552c2d2fe21d1c

Thank you for your support!

I did around a 3.5gb push the other day, which took around an hour and a half-ish. Completed without issue

@kubalobo thanks. In your logs I see a bit of weirdness with the KBFS service being restarted occasionally during the middle of the transfer (not sure why), and also possibly some pressure based on the size of the disk. But unfortunately, the git logs themselves don't contain much info. keybase log send only sends back a portion of the logs, and I guess the interesting parts of the git operation must have taken place before this portion of the logs.

If you're willing, could you please zip up all the *.git.* files in %APPDATA%\Local\Keybase and share them with me in our keybase://private/kubalobo,strib folder? That way I can get more info to see what the problem was. Thanks!

I put everything there.
Thank you!

Thanks, that was helpful! I think we probably need to re-think the way we upload huge collections of LFS files written all at once. We're trying to sync them all at once, instead of in small batches, and I think that's causing stress and maybe hanging on your system. I'll make an internal ticket to address.

In the meantime, if possible, I recommend only pushing small batches of files if you can break them up that way. Sorry for the bad experience, and thanks for the report!

Hi!
I just confirm that separating my files for independent commits and pushes result with no errors so it is a workaround.
Thank you again!

Thanks all. I just got some testing in on a Windows device, and you'll never guess this one simple trick to getting it to work...

Instead of completely removing each \\\" from the .git/config file, you can change them into \". That solved it for me.

I swear I tested the current code in CMD before and got it to work, so I'll have to go back and try to figure out how to make it work automatically in the next release. Sorry for the inconvenience. Let me know if the above helps.

This fixes the problem for me on Mac OS X with Keybase Version 5.1.1-20191211223249+15bbb94c23, git-lfs/2.9.2 and git version 2.21.1. This Keybase version is current as of Jan 25, 2020.

From the feedback in this issue I guess this problem is not related to Windows based OS only.
I can confirm that the following additional escaping in the .git/config file of my repository also fixed the „invalid character 'U' looking for beginning of value” error on my Linux system.

[lfs "customtransfer.keybase-lfs"]
  path = git-remote-keybase
  args = \"lfs origin keybase://private/arcticicestudio/repository\"

I'm running Arch Linux kernel 5.4.1-arch1-1 x86_64 and the Keybase versions Client: 5.1.1-20191211223501+15bbb94c23 and Service: 5.1.1-20191211223501+15bbb94c23.

Is this something keybase can fix? It seems a trivial bug to fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

veddermatic picture veddermatic  ·  3Comments

Alexendoo picture Alexendoo  ·  3Comments

Magi1053 picture Magi1053  ·  3Comments

daothanhphap picture daothanhphap  ·  3Comments

nikolayhg picture nikolayhg  ·  3Comments