One of our projects has a very large repository as a result of developers checking in a number of large binaries. I'm looking at using lfs on Gerrit 2.14 to see if that will help. I took a mirror of this repository and used git-lfs-migrate to convert it. At the end of the conversion, my converted local copy of the repository has a much smaller objects directory, and the bulk of the repository is now under the new lfs subdirectory. After pushing refs/heads and refs/tags to a new repository on my Gerrit server, I did a "git lfs push --all origin" and I see that the directory I specified for the fs backend in lfs.config starts to fill up with data. It gets a bit more than 60% of the way through, then I get a bunch of errors that look like this:Authentication required: Authorization error: https://redacted.redacted.com:8080/plugins/lfs/content/default/fc9913317b68a40842badadea3039dfbfbb584f999a66ee947a094180cd78b9eCheck that you have proper access to the repository
GIT_CURL_VERBOSE=1 GIT_TRACE=1 git lfs push --all origin
Which seems odd, since it already transferred most of my converted repo's lfs subdirectory to the server. If there were genuine authentication/authorization issues, I would have expected to hit that at the beginning, not more than halfway through the push. If I run my "git lfs push --all origin" again, it continues without error, but it does not transfer the entire contents of my converted repo's lfs subdirectory. Any successive runs after that have no effect. If I try this process again from scratch (easily repeated, since I'm doing this in a virtual machine which I can revert between tests), the first and second "git lfs push --all origin" always fail in the same place and continue to the same place. What would cause it to fail like this? The authentication/authorization error sure makes this sound like a permissions mistake. I've given myself create reference, create annotated tag, push (force), push merge commit, forge author, and forge committer on refs/* -- was there another permission I needed for this?I notice that the directory on the Gerrit server that acts as the lfs backend and the lfs/objects subdirectory of my converted repository appear to have the same contents (though the server's copy is incomplete so far), with the data sorted into buckets two levels deep based on the first four characters of the filenames. Can I simply copy the contents of that directory over to the lfs backend directory on my gerrit server and skip the git lfs push, or is there some additional accounting taking place when it gets pushed in through the Gerrit server's git-lfs plugin? Is there a better way to workaround this? In addition to getting the initial data into the repository, I'm also concerned about what I'll need to do to recover going forward if a user has a git lfs push fail partway through their push.thanks,--Andrew
--
--
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.
On Fri, Jun 2, 2017 at 3:41 PM euphxenos <euph...@gmail.com> wrote:One of our projects has a very large repository as a result of developers checking in a number of large binaries. I'm looking at using lfs on Gerrit 2.14 to see if that will help. I took a mirror of this repository and used git-lfs-migrate to convert it. At the end of the conversion, my converted local copy of the repository has a much smaller objects directory, and the bulk of the repository is now under the new lfs subdirectory. After pushing refs/heads and refs/tags to a new repository on my Gerrit server, I did a "git lfs push --all origin" and I see that the directory I specified for the fs backend in lfs.config starts to fill up with data. It gets a bit more than 60% of the way through, then I get a bunch of errors that look like this:Authentication required: Authorization error: https://redacted.redacted.com:8080/plugins/lfs/content/default/fc9913317b68a40842badadea3039dfbfbb584f999a66ee947a094180cd78b9eCheck that you have proper access to the repositoryCan you try it with tracing and see if that provides any useful additional information?GIT_CURL_VERBOSE=1 GIT_TRACE=1 git lfs push --all origin
Also, are you pushing over ssh or http?
Hi,It would be also good to get more details about the operation:- what is the binaries size that are being pushed
- git LFS client version
- how much time it goes before unrecoverable failure happens
- can you also go ahead and check if there are entries in the gerrit/logs/error_log
Hi,Last but not least what is the version of Gerrit and plugin (as seen on plugins list)?
You can try to play with authorisation token expiration time (default 10s) and set it for push time to some big value (e.g. 10min?), but it could be rather curing symptoms not real issue. Will look into it in the following days to reproduce/confirm.
Thanks for versions. What I have meant was Gerrit LFS client setting and link points to plugin documentation.
Regards
Jacek
You received this message because you are subscribed to a topic in the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/repo-discuss/o-Ypjv8bM6g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to repo-discuss...@googlegroups.com.
Plugin documentation :) sorry autocorrect changed it to client in the first part of the sentence.