[Easy Reproduce Step]
[Error]
Git LFS: (0 of 1 files) 0 B / 199.15 MB
@panpan0000 can not upload new objects to public fork panpan0000/test
Docs: https://github.com/contact
@panpan0000 can not upload new objects to public fork panpan0000/test
Docs: https://github.com/contact
error: failed to push some refs to 'https://github.com/panpan0000/test.git'
My motivation is to create an Pull Request with large files to a repo.
[SW Versions]
OS: Ubuntu 14.04.2 LTS
git-lfs/1.3.1 (GitHub; linux amd64; go 1.6.3; git 9c9dffb)
git version 2.9.3
[important Tips]
if the original repo already contains at least one big-file, then the step (7) can be successful . (but the big-file was been pushed directly by owner, instead via a Pull Request by other people).
so in step (1) , the "empty" just an easy way for you to reproduce. I believe the issue exists when a repo never being push for big-images before.
[Tips-2]
I tried same thing with a private github enterprise, the error message is a bit different than Github.com:
Git LFS: (0 of 1 files) 398.31 MB / 199.15 MB
Not found
Request ID: b63c57e4-629d-11e6-8ded-22bb4fb7fd29
Not found
Request ID: b63c57e4-629d-11e6-8ded-22bb4fb7fd29
error: failed to push some refs to 'https://xxxxx/xxxx/xxxx.git'
@panpan0000 On GitHub.com, you can't push LFS assets to a public fork unless the original repo already has LFS objects, or you have push access to the original repo. This is a server side rule to prevent abuse. Once the public repository has LFS objects, anyone should be able to push LFS objects to their forks. If you see an issue here, let me know the repository fork and the owner trying to push so we can look into it.
You didn't print out enough data on your Enterprise error. I'll need to know:
git lfs env
GIT_CURL_VERBOSE=1
I'd recommend sending this info to https://enterprise.github.com/support or https://github.com/support, since it can contain private details about your instance.
Hi, @technoweenie , Thank you so much for your response.
it's quite clear. I believe that the failure in GitHub Enterprise is due to same reason. because once the repo has LFS objects as you mentioned, then the pull to forked repo are all set.
Thank you very much !
BTW: I don't know if this is a normal senario and lots of people will meet it. if yes , then document this in FAQ may be helpful. because not all the time people who contribute a repo have directly push privillage and have to contribute via pull request.
See also #1906. IMHO this should not work like this, forks should be able to enable git-lfs, no reason it's only the top repo that can enable it. If I clone a repo, breaks the link to the origin and push as if it was my own repo, then I can enable git-lfs, that's ridiculous.
Most helpful comment
See also #1906. IMHO this should not work like this, forks should be able to enable git-lfs, no reason it's only the top repo that can enable it. If I clone a repo, breaks the link to the origin and push as if it was my own repo, then I can enable git-lfs, that's ridiculous.