Does Gerrit support LFS?

2,743 views
Skip to first unread message

Gaurav Negi

unread,
Oct 7, 2017, 1:35:15 PM10/7/17
to repo-d...@googlegroups.com
Dear all,
Does Gerrit support LFS?
I want to move multiple GIT Repos in bitbucket to A single monolithic GIT Repo in Gerrit.
But many of these Repos have huge videos and picture files in LFS.

Does Gerrit support LFS? I donot want to keep big files in MBs in regular git repo.

Please suggest.

Thanks
-Gaurav

Sent from my iPhone

David Pursehouse

unread,
Oct 7, 2017, 6:44:49 PM10/7/17
to Gaurav Negi, repo-d...@googlegroups.com

Since version 2.13 LFS is supported. You need to install the lfs plugin.


--
--
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.

Gaurav Negi

unread,
Oct 10, 2017, 7:58:18 PM10/10/17
to David Pursehouse, repo-d...@googlegroups.com
Thanks David.

Is this the right location to download LFS plugin?


I am using Gerrit version 2.14.4 version.

Thanks
-Gaurav

On Sat, Oct 7, 2017 at 3:44 PM, David Pursehouse <david.pu...@gmail.com> wrote:

Since version 2.13 LFS is supported. You need to install the lfs plugin.


On Sun, 8 Oct 2017, 02:35 Gaurav Negi, <gaura...@gmail.com> wrote:
Dear all,
    Does Gerrit support LFS?
I want to move multiple GIT Repos in bitbucket to A single monolithic GIT Repo in Gerrit.
But many of these Repos have huge videos and picture files in LFS.

Does Gerrit support LFS? I donot want to keep big files in MBs in regular git repo.

Please suggest.

Thanks
-Gaurav

Sent from my iPhone

--
--
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.

thomasmu...@yahoo.com

unread,
Oct 10, 2017, 8:03:36 PM10/10/17
to Repo and Gerrit Discussion
Yep that's the correct loc

David Pursehouse

unread,
Oct 11, 2017, 2:36:57 AM10/11/17
to Gaurav Negi, repo-d...@googlegroups.com
On Sun, Oct 8, 2017 at 7:44 AM David Pursehouse <david.pu...@gmail.com> wrote:

Since version 2.13 LFS is supported. You need to install the lfs plugin.



I should add:  if you want to use the LFS locks functionality, you need to use Gerrit version at least 2.14.1

Gaurav Negi

unread,
Oct 11, 2017, 4:45:58 PM10/11/17
to David Pursehouse, repo-d...@googlegroups.com
Thanks David. 

I am seeing some issues with LFS on Gerrit 2.14.4


Inline image 1
2. I am trying to do initial push with LFS tracked files. 

gaurav@gaurav-virtual-machine ~/gerrit/mmm $ git push origin HEAD:master
Git LFS: (0 of 1984 files) 0 B / 433.04 MB                                                                                              
exit status 1
exit status 1
exit status 1
exit status 1
........
........
exit status 1
error: failed to push some refs to 'ssh://g.n...@gerrit.domain.com:29418/meta-sdk'


3. Logs on server says this GERRITINSTALL/logs/sshd_logs

[2017-10-11 13:39:19,775 -0700] 88832d7e g.negi a/1000000 LOGIN FROM 172.16.53.195
[2017-10-11 13:39:19,800 -0700] 88832d7e g.negi a/1000000 git-lfs-authenticate.meta-sdk.upload 0ms 3ms 1
[2017-10-11 13:39:19,848 -0700] 88832d7e g.negi a/1000000 LOGOUT
[2017-10-11 13:39:19,984 -0700] c85045f0 g.negi a/1000000 LOGIN FROM 172.16.53.195
[2017-10-11 13:39:20,005 -0700] c85045f0 g.negi a/1000000 git-lfs-authenticate.meta-sdk.upload 0ms 2ms 1
[2017-10-11 13:39:20,053 -0700] c85045f0 g.negi a/1000000 LOGOUT
[2017-10-11 13:39:20,193 -0700] 08473d37 g.negi a/1000000 LOGIN FROM 172.16.53.195
[2017-10-11 13:39:20,216 -0700] 08473d37 g.negi a/1000000 git-lfs-authenticate.meta-sdk.upload 0ms 2ms 1
[2017-10-11 13:39:20,261 -0700] 08473d37 g.negi a/1000000 LOGOUT
.........

Any idea?

Thanks
-Gaurav

On Tue, Oct 10, 2017 at 11:36 PM, David Pursehouse <david.pu...@gmail.com> wrote:
On Sun, Oct 8, 2017 at 7:44 AM David Pursehouse <david.pu...@gmail.com> wrote:

Since version 2.13 LFS is supported. You need to install the lfs plugin.



I should add:  if you want to use the LFS locks functionality, you need to use Gerrit version at least 2.14.1
On Sun, 8 Oct 2017, 02:35 Gaurav Negi, <gaura...@gmail.com> wrote:
Dear all,
    Does Gerrit support LFS?
I want to move multiple GIT Repos in bitbucket to A single monolithic GIT Repo in Gerrit.
But many of these Repos have huge videos and picture files in LFS.

Does Gerrit support LFS? I donot want to keep big files in MBs in regular git repo.

Please suggest.

Thanks
-Gaurav

Sent from my iPhone

--
--

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.

Gaurav Negi

unread,
Oct 11, 2017, 5:11:30 PM10/11/17
to David Pursehouse, repo-d...@googlegroups.com
Forgot to mention, I have following entry in gerrit.config

[lfs "?/*"]
      enabled = true
      maxObjectSize = 200 M

Thanks
-Gaurav

David Pursehouse

unread,
Oct 11, 2017, 7:37:41 PM10/11/17
to Gaurav Negi, repo-d...@googlegroups.com
On Thu, Oct 12, 2017 at 6:11 AM Gaurav Negi <gaura...@gmail.com> wrote:
Forgot to mention, I have following entry in gerrit.config

[lfs "?/*"]
      enabled = true
      maxObjectSize = 200 M


As described in the documentation [1], this should be configured in the lfs.config file on refs/meta/config of All-Projects.

In the gerrit.config, the LFS plugin should be enabled with:

[lfs]
  plugin = lfs

And finally, make sure the lfs.url value is set in the git project's .git/config (see "Local Project Configuration" in the documentation).

If it is still not working, enabling git logging might help to track down what is going wrong:

  GIT_CURL_VERBOSE=1 GIT_TRACE=1 git push origin ...


 
Thanks
-Gaurav


On Wed, Oct 11, 2017 at 1:45 PM, Gaurav Negi <gaura...@gmail.com> wrote:
Thanks David. 

I am seeing some issues with LFS on Gerrit 2.14.4


image.png
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.

Gaurav Negi

unread,
Oct 11, 2017, 8:20:52 PM10/11/17
to David Pursehouse, repo-d...@googlegroups.com
Thanks a ton David.
However a further question.

Local Project Configuration

The following options must be set in the local project's .git/config file.

Section lfs

lfs.url : http://<username>@<gerrit-host>:<port>/<project-name>/info/lfs

When the Gerrit repo is cloned via ssh, the git lfs url must be set to use http.


Does it mean every time a user(s) clones the repo, he needs to add this entry in his local cloned repo .git/config?

[lfs]

   url= http://<username>@<gerrit-host>:<port>/<project-name>/info/lfs


Thanks

-Gaurav


Thanks
-Gaurav



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.

David Pursehouse

unread,
Oct 11, 2017, 8:35:06 PM10/11/17
to Gaurav Negi, repo-d...@googlegroups.com
On Thu, Oct 12, 2017 at 9:20 AM Gaurav Negi <gaura...@gmail.com> wrote:
Thanks a ton David.
However a further question.

Local Project Configuration

The following options must be set in the local project's .git/config file.

Section lfs

lfs.url : http://<username>@<gerrit-host>:<port>/<project-name>/info/lfs

When the Gerrit repo is cloned via ssh, the git lfs url must be set to use http.


Does it mean every time a user(s) clones the repo, he needs to add this entry in his local cloned repo .git/config?


TBH I haven't used this a lot, so I'm not sure.  It might be that the lfs client will add it, but if not then yes, the user should add it.

 
Thanks
-Gaurav


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.
Reply all
Reply to author
Forward
0 new messages