Hi,
I wanted to get started with git lfs, so I downloaded the source and built the plugin. Installing seems to work, my configuration looks like this:
[lfs]
plugin = lfs
[plugin "lfs"]
backend = fs
In the All-Projects I have added lfs.config:
~/git/All-Projects$ ls
groups lfs.config project.config
containing:
[lfs ".*"]
enabled = true
maxObjectSize = 500m
I have created a project called "playground" (prior to setting the config in the All-Projects if that matters):
I have configured git lfs with a pdf smudge and set the url in my .git/config :
[lfs]
url = http://nils@<snipped>/playground/info/lfs
But pushing fails, with the log containing:
batch response: Fatal error: http: LFS is not available for repository playground
github.com/github/git-lfs/errors.newWrappedError
/Users/rick/go/src/github.com/github/git-lfs/errors/types.go:166
github.com/github/git-lfs/errors.Wrap
/Users/rick/go/src/github.com/github/git-lfs/errors/errors.go:73
github.com/github/git-lfs/api.Batch
/Users/rick/go/src/github.com/github/git-lfs/api/api.go:103
github.com/github/git-lfs/lfs.(*TransferQueue).batchApiRoutine
/Users/rick/go/src/github.com/github/git-lfs/lfs/transfer_queue.go:356
runtime.goexit
/usr/local/Cellar/go/1.7/libexec/src/runtime/asm_amd64.s:2086
Any help or suggestions very much appreciated. :-)
Cheers,
Nils
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
I wanted to get started with git lfs, so I downloaded the source and built the plugin. Installing seems to work, my configuration looks like this:
[lfs]
plugin = lfs
[plugin "lfs"]
backend = fs
--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
On 09/22/2016 02:08 PM, Saša Živkov wrote:
I guess you put that into etc/gerrit.config? This is likely not supported.Instead, create etc/lfs.config with the following content:
[storage]backend = fs
Does it work if you change the lfs section to explicitly mention the project name?
i.e.:[lfs "playground"]
Did you configure LFS access following [1] ?
-Matthias
http://<username>@<gerrit-host>:<port>/gerrit/<project-name>/info/lfs
On 09/22/2016 02:08 PM, Saša Živkov wrote:
I guess you put that into etc/gerrit.config? This is likely not supported.Instead, create etc/lfs.config with the following content:
[storage]backend = fs
Ok, added that.
...
On 09/22/2016 02:02 PM, David Pursehouse wrote:
Ok, changed this for the experimentDoes it work if you change the lfs section to explicitly mention the project name?
i.e.:[lfs "playground"]
....
On 09/22/2016 01:58 PM, Matthias Sohn wrote:
Ok, this was a bit different than what I saw somewhere else, maybe an old post. Specifically the lfs.url at the bottom:Did you configure LFS access following [1] ?
-Matthias
http://<username>@<gerrit-host>:<port>/gerrit/<project-name>/info/lfs
Is this /gerrit/ really supposed to be there?
I changed all this, and I think we have taken a step forward because now I get the following:
nils@nils:~/git/playground-lfs$ git push origin master
Password for 'http://nils@<snip>':
Password for 'http://nils@<snip>':
Git LFS: (0 of 1 files) 0 B / 2.46 MB
LFS: Repository or object not found: http://nils@<snip>/gerrit/playground/info/lfs/objects
Check that it exists and that you have proper access to it
error: failed to push some refs to 'ssh://nils@<snip>:29418/playground'
Entering a http password (one with which clone and fetch works, doesn't seem to work in this case.
My .git/config now looks like this:
[lfs]
url = http://nils@<snip>/gerrit/playground/info/lfs
batch = false
On Thu, Sep 22, 2016 at 11:37 PM, Nils Carlson <nils.c...@ludd.ltu.se> wrote:On 09/22/2016 02:08 PM, Saša Živkov wrote:
I guess you put that into etc/gerrit.config? This is likely not supported.Instead, create etc/lfs.config with the following content:
[storage]backend = fs
Ok, added that.
...
On 09/22/2016 02:02 PM, David Pursehouse wrote:
Ok, changed this for the experimentDoes it work if you change the lfs section to explicitly mention the project name?
i.e.:[lfs "playground"]
....
On 09/22/2016 01:58 PM, Matthias Sohn wrote:
Ok, this was a bit different than what I saw somewhere else, maybe an old post. Specifically the lfs.url at the bottom:Did you configure LFS access following [1] ?
-Matthias
http://<username>@<gerrit-host>:<port>/gerrit/<project-name>/info/lfs
Is this /gerrit/ really supposed to be there?No.This is a mistake in the documentation.
Dear All,I am having similar error while working on LFS.Sorry for buzzing, i am trying LFS very 1st time with Gerrit.Somehow steps mentioned below did not fix my issue.I am using Gerrit 2.14.4, with LFS plugin installed.1. On Gerritserver in etc/gerrit.config, I have following entry[lfs]
plugin = lfs
[storage]
backend = fs
[auth]type = OAUTH
gitBasicAuthPolicy = HTTP
sshExpirationSeconds = 1002. On All-Projects.git meta/config branch I have added lfs.configgaurav@gaurav-virtual-machine ~/gerrit/allproj $ git branch
* meta/config
gaurav@gaurav-virtual-machine ~/gerrit/allproj $ ls -ltr
total 12
-rw-rw-r-- 1 gaurav gaurav 2262 Oct 11 13:15 project.config
-rw-rw-r-- 1 gaurav gaurav 63 Oct 11 13:15 lfs.config
-rw-rw-r-- 1 gaurav gaurav 344 Oct 11 13:15 groups
gaurav@gaurav-virtual-machine ~/gerrit/allproj $ cat lfs.config
[lfs ".*"]
enabled = true
maxObjectSize = 500m
3. my local git cloned repo has following entry in .git/config
4. But when I am pushing the change with .gitattributes changed, it is throwing error.
$ git push origin HEAD:master
Git LFS: (0 of 126 files) 0 B / 31.80 MB
LFS is not available for repository el
Errors logged to /home/gaurav/jupiter/el/.git/lfs/objects/logs/20171011T131813.903614671.log
Use `git lfs logs last` to view the log.
LFS is not available for repository el
Errors logged to /home/gaurav/jupiter/el/.git/lfs/objects/logs/20171011T131813.906089606.log
Use `git lfs logs last` to view the log.
5. Log file says LFS is not available for the repository.
$ cat /home/gaurav/jupiter/el/.git/lfs/objects/logs/20171011T131813.903614671.log
git-lfs/1.2.1 (GitHub; linux 386; go 1.6.2; git 79bedeb)
git version 2.7.4
$ git-lfs pre-push origin ssh://g.n...@gerrit.domain.com:29418/el
LFS is not available for repository el
LFS is not available for repository el
goroutine 1 [running]:
github.com/github/git-lfs/lfs.Stack(0x0, 0x0, 0x0)
/Users/rick/go/src/github.com/github/git-lfs/lfs/errors.go:566 +0x80
github.com/github/git-lfs/commands.logPanicToWriter(0xb773e1f0, 0x189d65e0, 0xb76fab38, 0x189d61e8)
/Users/rick/go/src/github.com/github/git-lfs/commands/commands.go:197 +0xd00
github.com/github/git-lfs/commands.logPanic(0xb76fab38, 0x189d61e8, 0x0, 0x0)
/Users/rick/go/src/github.com/github/git-lfs/commands/commands.go:161 +0x35a
If anyone can give any clue, that will be great.Thanks
-Gaurav
On Friday, September 23, 2016 at 3:15:15 AM UTC-7, Nils Carlson wrote:Hi,
This is all now working, thank you very much for the help. The final step (after fixing the url and batch mode in .git/config locally and enabling basic auth server side) was to add this:
client_max_body_size 256M;
to my nginx configuration for the reverse proxy, in case somebody stumbles across this problem.
Thank you again for all the help.
Cheers,
Nils
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
LFS Options | |
Enabled: | true |
Max Object Size: | 524288000 |
Read Only: | false |
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
Thanks David. You cracked it.//I'm not 100% sure but you might need a leading ^ on the regular expression.Yes that was the issue. After making it[lfs "^.*"]enabled = trueIt works. And on UI also I can see LFS enabled for project.
LFS OptionsEnabled: true Max Object Size: 524288000 Read Only: false However, lfs push is hanging, after 1st 100 files.
$ git push origin HEAD:master
Git LFS: (0 of 1470 files) 0 B / 1.10 GB
Git LFS: (100 of 1470 files) 74.86 MB / 1.10 GB
I am seeing above message for over 2 hours an dit is not moving forward.
Thanks David. You cracked it.//I'm not 100% sure but you might need a leading ^ on the regular expression.Yes that was the issue. After making it[lfs "^.*"]enabled = trueIt works. And on UI also I can see LFS enabled for project.
LFS OptionsEnabled: true Max Object Size: 524288000 Read Only: false However, lfs push is hanging, after 1st 100 files.$ git push origin HEAD:master
Git LFS: (0 of 1470 files) 0 B / 1.10 GB
Git LFS: (100 of 1470 files) 74.86 MB / 1.10 GB
I am seeing above message for over 2 hours an dit is not moving forward.
GIT_CURL_VERBOSE=1 GIT_TRACE=1 git push ...
Thanks-Gaurav
To unsubscribe, email repo-discuss...@googlegroups.com
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
On Tue, Oct 17, 2017 at 5:14 AM Gaurav Negi <gaura...@gmail.com> wrote:
Thanks David. You cracked it.//I'm not 100% sure but you might need a leading ^ on the regular expression.Yes that was the issue. After making it[lfs "^.*"]enabled = trueIt works. And on UI also I can see LFS enabled for project.
LFS OptionsEnabled: true Max Object Size: 524288000 Read Only: false However, lfs push is hanging, after 1st 100 files.$ git push origin HEAD:master
Thanks-Gaurav
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
Thanks David, but not much luckfb504da023de35c184e0dc05baf451a7e9be1a5f4994664214ac15abdaad7d14","size":23394},{"oid":"63391cca95cfa41fcd21f012458bbd79ae2841d7f0e05808c92fca7217d00c8c","size":23531},{"oid":"b16b63f80d0c838910ecc76f96d325c69e3fecca9eb50c0b04a955692faa141a","size":23497},{"oid":"26fa26920329a13e2c9993fb371272d4cbf0ccf47adb0b30cf620d61f7e42903","size":23432},{"oid":"ca448a51435fad55d99429edb6553deaead8c832b7066128b7632cde4e0667fc","size":23581},{"oid":"ea585e437fde2ba768f4891126b4e018c10fe7c05bfb6deda4487c471eb7e722","size":25418},{"oid":"85cada699cf6e7a35bf2072af23492e4b3c8ec1151ee9bb05aae78f8bb940971","size":26342},{"oid":"ef220d73c994f0b493535493addb2c62f749c4228c986492f24c4c04b3c63c82","size":26307},{"oid":"10ad15db6e702eacd3195d24c926990f5b12d9df5fe01c895b8192253d2c2ae5","size":23799},{"oid":"25caccadbaa3998ecbbb37441244330f68cdf01b93d43091034fcb7ee7f5221b","size":19154},{"oid":"f1a99e4b0baa85bbfc0d89d75ca43ccdd1a7e2554598a375e6cc12d107aff98c","size":19130},{"oid":"0b7beff0a78eac6a2138f65f365983f12ba6acd6a8888a2e12367c96586ba6b8","size":28022},{"oid":"6328ba62a46a79f7fccadd5a264e4bec587bd7c86749b92d23687d81be65f5da","size":28087}]}trace git-lfs: HTTP:
trace git-lfs: tq: sending batch of size 26
trace git-lfs: api: batch 26 files
Git LFS: (0 of 126 files, 100 skipped) 0 B / 31.80 MB, 9.93 MB skipped
Git LFS: (0 of 126 files, 100 skipped) 0 B / 31.80 MB, 9.93 MB skippedIt is hanging there.(1st 100 files were pushed in my last attempt).
Thanks-Gaurav
On Mon, Oct 16, 2017 at 4:44 PM, David Pursehouse <david.pu...@gmail.com> wrote:
On Tue, Oct 17, 2017 at 5:14 AM Gaurav Negi <gaura...@gmail.com> wrote:
Thanks David. You cracked it.//I'm not 100% sure but you might need a leading ^ on the regular expression.Yes that was the issue. After making it[lfs "^.*"]enabled = trueIt works. And on UI also I can see LFS enabled for project.
LFS OptionsEnabled: true Max Object Size: 524288000 Read Only: false However, lfs push is hanging, after 1st 100 files.$ git push origin HEAD:master
Thanks-Gaurav
To unsubscribe, email repo-discuss...@googlegroups.com
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
Thanks-Gaurav
Thanks-Gaurav
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
trace git-lfs: Filled credentials for http://172.16.2.31:8081/artifactory/api/lfs/gerrit
trace git-lfs: HTTP: POST http://172.16.2.31:8081/artifactory/api/lfs/gerrit/objects/batch
> POST /artifactory/api/lfs/gerrit/objects/batch HTTP/1.1
Hi David and others, anything I can do to move further.Gut push with LFS is hanging for forever.Sent from my iPhone
Hi David,Sorry for the late reply.Tried it again now. Deleted everything from Gerrit log, Restarted Gerrit server and then tried push again.Again git push when we have LFS files is hanging after 100 files.This is what I see on client and server side.If you can give me any lead or clue, that will be great.
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git push origin HEAD:master
10:56:48.121364 git.c:344 trace: built-in: git 'push' 'origin' 'HEAD:master'
10:56:48.121739 run-command.c:334 trace: run_command: 'ssh' '-p' '29418' 'g.n...@gerrit.metavision.com' 'git-receive-pack '\''/el'\'''
10:56:48.627684 run-command.c:334 trace: run_command: '.git/hooks/pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
10:56:48.696181 git.c:561 trace: exec: 'git-lfs' 'pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
10:56:48.698457 run-command.c:334 trace: run_command: 'git-lfs' 'pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
Sorry, I didn't have time to look into this until now. I just had a look into the logs posted below, and saw this:
trace git-lfs: Filled credentials for http://172.16.2.31:8081/artifactory/api/lfs/gerrit
trace git-lfs: HTTP: POST http://172.16.2.31:8081/artifactory/api/lfs/gerrit/objects/batch
> POST /artifactory/api/lfs/gerrit/objects/batch HTTP/1.1It looks like the LFS client is sending objects to artifactory, and not to Gerrit?
On Thu, Nov 16, 2017 at 9:12 AM Gaurav Negi <gaura...@gmail.com> wrote:
Hi David and others, anything I can do to move further.Gut push with LFS is hanging for forever.Sent from my iPhone
Hi David,Sorry for the late reply.Tried it again now. Deleted everything from Gerrit log, Restarted Gerrit server and then tried push again.Again git push when we have LFS files is hanging after 100 files.This is what I see on client and server side.If you can give me any lead or clue, that will be great.
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git push origin HEAD:master
10:56:48.121364 git.c:344 trace: built-in: git 'push' 'origin' 'HEAD:master'
10:56:48.121739 run-command.c:334 trace: run_command: 'ssh' '-p' '29418' 'g.n...@gerrit.metavision.com' 'git-receive-pack '\''/el'\'''
10:56:48.627684 run-command.c:334 trace: run_command: '.git/hooks/pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
10:56:48.696181 git.c:561 trace: exec: 'git-lfs' 'pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
10:56:48.698457 run-command.c:334 trace: run_command: 'git-lfs' 'pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
Hi David,I tried with this approach to put LFS files to artifactory (which is hosted in same server as Gerrit).
by changing .git/config.I can move it back to Gerrit server and send you the logs. But I was getting same issue earlier also.
Thanks-Gaurav
On Wed, Nov 15, 2017 at 4:53 PM, David Pursehouse <david.pu...@gmail.com> wrote:
Sorry, I didn't have time to look into this until now. I just had a look into the logs posted below, and saw this:
trace git-lfs: Filled credentials for http://172.16.2.31:8081/artifactory/api/lfs/gerrit
trace git-lfs: HTTP: POST http://172.16.2.31:8081/artifactory/api/lfs/gerrit/objects/batch
> POST /artifactory/api/lfs/gerrit/objects/batch HTTP/1.1It looks like the LFS client is sending objects to artifactory, and not to Gerrit?
On Thu, Nov 16, 2017 at 9:12 AM Gaurav Negi <gaura...@gmail.com> wrote:
Hi David and others, anything I can do to move further.Gut push with LFS is hanging for forever.Sent from my iPhone
Hi David,Sorry for the late reply.Tried it again now. Deleted everything from Gerrit log, Restarted Gerrit server and then tried push again.Again git push when we have LFS files is hanging after 100 files.This is what I see on client and server side.If you can give me any lead or clue, that will be great.
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git push origin HEAD:master
10:56:48.121364 git.c:344 trace: built-in: git 'push' 'origin' 'HEAD:master'
10:56:48.121739 run-command.c:334 trace: run_command: 'ssh' '-p' '29418' 'g.n...@gerrit.metavision.com' 'git-receive-pack '\''/el'\'''
10:56:48.627684 run-command.c:334 trace: run_command: '.git/hooks/pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
10:56:48.696181 git.c:561 trace: exec: 'git-lfs' 'pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
10:56:48.698457 run-command.c:334 trace: run_command: 'git-lfs' 'pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
On Thu, Nov 16, 2017 at 9:56 AM Gaurav Negi <gaura...@gmail.com> wrote:Hi David,I tried with this approach to put LFS files to artifactory (which is hosted in same server as Gerrit).That blog post was written before LFS support was finished in Gerrit :)by changing .git/config.I can move it back to Gerrit server and send you the logs. But I was getting same issue earlier also.If you're getting the same error from both Artifactory and Gerrit, it would suggest that the problem is in the client.
Thanks-Gaurav
10:56:48.627684 run-command.c:334 trace: run_command: '.git/hooks/pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
10:56:48.696181 git.c:561 trace: exec: 'git-lfs' 'pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
10:56:48.698457 run-command.c:334 trace: run_command: 'git-lfs' 'pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
Thanks-Gaurav
10:56:48.627684 run-command.c:334 trace: run_command: '.git/hooks/pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
10:56:48.696181 git.c:561 trace: exec: 'git-lfs' 'pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
10:56:48.698457 run-command.c:334 trace: run_command: 'git-lfs' 'pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
//If you're getting the same error from both Artifactory and Gerrit, it would suggest that the problem is in the client.You cracked it David. You cracked it. Yes local git client was the issue.I was using git client 2.7.4 on Ubuntu, That had issues.
When I tried the push from windows (git version 2.13.3.windows.1) it worked.
Thank a ton David, you made my day. I owe you a dinner, please let me know when you are around Bayarea.
Thanks-Gaurav
Thanks-Gaurav
10:56:48.627684 run-command.c:334 trace: run_command: '.git/hooks/pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
10:56:48.696181 git.c:561 trace: exec: 'git-lfs' 'pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
10:56:48.698457 run-command.c:334 trace: run_command: 'git-lfs' 'pre-push' 'origin' 'ssh://g.n...@gerrit.metavision.com:29418/el'
Thanks-Gaurav
Thanks-Gaurav
10:56:48.627684 run-command.c:334 trace: run_command: '.git/hooks/pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
10:56:48.696181 git.c:561 trace: exec: 'git-lfs' 'pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'
10:56:48.698457 run-command.c:334 trace: run_command: 'git-lfs' 'pre-push' 'origin' 'ssh://g.negi@gerrit.metavision.com:29418/el'