|Re: [jgit-dev] [egit-dev] Git LFS|
I implemented parts of this...
We are using JGit LFS in production for some time now (~1Âyear) with thousands of users.
We are using authentication through SSH (using Gerrit and the Gerrit LFS plugin, which supports obtaining authentication tokens using 'ssh server git-lfs-authenticate project').
If nothing changed in the meantime, I guess HTTP(S) authentication is simply not supported (yet). Matthias did some tests against GitHub back then, and AFAIR they were successful, but I don't know what was the exact setup for the tests...
From: egit-dev-bounces@xxxxxxxxxxx <egit-dev-bounces@xxxxxxxxxxx> on behalf of Bossert, Andre <anb0s@xxxxxxxx>
Sent: Wednesday, April 17, 2019 10:31
To: JGit Developers list (jgit-dev@xxxxxxxxxxx); EGit developer discussion (egit-dev@xxxxxxxxxxx)
Cc: Andre Bossert
Subject: Re: [egit-dev] Git LFSÂI've found the option "lfs.useJGitBuiltin = true" that enables builtin LFS support. The pre-push hooks shows an error / exception, because of the autorization...!STACK 0org.eclipse.jgit.errors.TransportException: When trying to open a connection to https://[server]/artifactory/[project]/objects/batch the server responded with an error code. rc=401at org.eclipse.jgit.transport.Transport.push(Transport.java:1365)at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:191)at org.eclipse.egit.ui.internal.push.ConfirmationPage$2.run(ConfirmationPage.java:211)at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)Caused by: java.io.IOException: When trying to open a connection toÂ https://[server]/artifactory/[project]/objects/batchÂÂthe server responded with an error code. rc=401at org.eclipse.jgit.lfs.LfsPrePushHook.requestBatchUpload(LfsPrePushHook.java:214)at org.eclipse.jgit.lfs.LfsPrePushHook.call(LfsPrePushHook.java:123)at org.eclipse.jgit.transport.Transport.push(Transport.java:1363)...
There is no dialog to enter the username and password. How can we enable this?
I've found only this information about LFS:...
Eclipse JGit: Java implementation of Git 4.2
Support git-lfs extension
Add support for pre-push hooks
- Add support for smudge filters.ÂIf defined in .gitattributes call smudge filter during checkout.
- Add support for clean filters.ÂIf defined in .gitattributes call clean filter during add to index....
The pre-push hook is not executed in the case native git lfs is used, but it looks like the filters are executed... Is there any deeper information about JGit LFS ?
Am Di., 16. Apr. 2019 um 10:30ÂUhr schrieb Bossert, Andre <anb0s@xxxxxxxx>:
we are using native Git with LFS support. The LFS files are pushed to an Artifactory server (https).Filters (smudge and clean) and Hooks (post-checkout, pre-push etc.) are executed.
Now i'm trying to use Eclipse EGIt / JGit and it looks different:
- after a binary file (LFS tracked) is added to staging area "git lfs status" shows it in "Git LFS objects to be committed:" and "Git LFS objects not staged for commit:", but expected and seen in native Git it should be in "Git LFS objects to be committed:" only.
- push does not send the file to Artifactory, but there is no exception / error etc. The "oid sha256" from the git pointer file cannot be found at Artifactory server.
- it's also not clear for us if native git lfs is used or the embedded JGit LFS - are both ways still supprted? If yes how can we choose?
How can we analyse the issues? Is there any deep documentation about how it works or some FAQ where to search or enable some debug log etc.?
Thanks and Regards,Andre
RegardsAndre (anb0s)eMail: anb0s@xxxxxxxx
SSI SchÃfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht fÃr Zivilrechtssachen Graz