This page is a place to document tips and techniques for using git-annex.
what to do when you lose a repository
Posted Sat Sep 22 03:36:59 2012
using gitolite with git-annex
Posted Sat Sep 22 03:36:59 2012
finding duplicate files
Posted Tue Jul 17 17:54:57 2012
using git annex with no fixed hostname and optimising ssh
Posted Tue Jul 17 17:54:57 2012
using the web as a special remote
Posted Tue Jul 17 17:54:57 2012
visualizing repositories with gource
Posted Tue Jul 17 17:54:57 2012
centralised repository: starting from nothing
Posted Tue Jul 17 17:54:57 2012
migrating data to a new backend
Posted Tue Jul 17 17:54:57 2012
Internet Archive via S3
Posted Tue Jul 17 17:54:57 2012
centralized git repository tutorial
Posted Tue Jul 17 17:54:57 2012
powerful file matching
Posted Tue Jul 17 17:54:57 2012
automatically getting files on checkout
Posted Tue Jul 17 17:54:57 2012
what to do when a repository is corrupted
Posted Tue Jul 17 17:54:57 2012
using Amazon S3
Posted Tue Jul 17 17:54:57 2012
using assume-unstages to speed up git with large trees of annexed files
Posted Tue Jul 17 17:54:57 2012
recover data from lost+found
Posted Tue Jul 17 17:54:57 2012
untrusted repositories
Posted Tue Jul 17 17:54:57 2012
using the SHA1 backend
Posted Tue Jul 17 17:54:57 2012
using box.com as a special remote
Posted Tue Jul 17 17:54:57 2012
dead
is the best we can do. The automatic merging used on the git-annex branch tends to re-add lines that are deleted in one repo when merging with another that still has them.Looks like you are missing a closing double quote on the line:
echo '$GL_ADC_PATH = "/usr/local/lib/gitolite/adc/;' >>~gitolite/.gitolite.rc
right after /;
I got this working by the way - great stuff.
Is there a way to have git-annex completely ignore a repository? I see that the
dead
command adds the uuid of the repository totrust.log
but does not changeuuid.log
. Is it enough to remove the corresponding line inuuid.log
andtrust.log
?Well a repo url like
gitolite@localhost:testing
puts it in the gitolite user's /~/testingThis worked when I added the gitolite stuff, anyway.. Let's see if it still does:
Still seems right, the ADC's regexp will match this the git-annex shell command.
I guess there is some path rewriting going in in gitolite proper because if try a url of the form ssh://git@localhost/testing, then it still works with gitolite, but fails with the ADC because the repo is passed as /testing:
What I have to ask Sitaram and or find in the docs is if this is a bug or a feature in gitolite. I can see how the leading slash would get swallowed up by this line
in gl-auth-command, but I guess that isn't the whole story.
I confirmed with Sitaram that this is intentional, if probably under-documented. Since the ADC strips the leading /~/ in assigning $start anyway, I guess something like the following will work
That patch seems ok, it doesn't seem to allow through any repo locations that were blocked before.
So, it has my blessing.. but the ADC is in gitolite and will need to be patched there.
ControlPersist is awesome - thanks!
Here's an alternative, git-specific approach.
/~/
comes from. I don't anticipate this changing on the git-annex side.After some debugging printing, here is my current understanding.
urls of the form git@host:~repo or ssh://git@host
urls of the form git@host:/repo or ssh://git@host/repo
urls of the form git@host:repo
So the weird case is the last one where git and git-annex are sending different things over the wire. I don't know if you have other motivations for doing the url normalization on the client side, but it isn't needed for gitolite, and in some sense complicates things a little. On the other hand, now that I see what is going on, it isn't a big deal to just strip the leading /~ off in the adc. It does lead to the odd situation of some URLs working for git-annex but not git.