From 948dd8a0ccdf649160a10b5700451d0a75eb38df Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 13 Apr 2021 12:55:50 -0400 Subject: [PATCH] change back to git-remote-gcrypt 1.4 url forms, with a note that that version is needed --- doc/special_remotes/gcrypt.mdwn | 11 ++++------- .../fully_encrypted_git_repositories_with_gcrypt.mdwn | 10 +++++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/doc/special_remotes/gcrypt.mdwn b/doc/special_remotes/gcrypt.mdwn index 0fc6285c41..94ba546b6c 100644 --- a/doc/special_remotes/gcrypt.mdwn +++ b/doc/special_remotes/gcrypt.mdwn @@ -32,14 +32,11 @@ gcrypt: To use a local git repository, use: `gitrepo=/path/to/repo` - For a git repository accessed using rsync over ssh, use: - `gitrepo=rsync://user@host:/path/to/repo` - - For a git repository accessed over ssh, and using git-annex-shell - to transfer data, use: - `gitrepo=ssh://user@host/path/to/repo` or `gitrepo=host:path` + For a git repository accessed over ssh, an `rsync://` url uses rsync over + ssh, while a `ssh://` url uses git-annex-shell over ssh. Note that each `git push` has to re-send the whole content of the git - repository when using this option. + repository when using the latter option, so rsync urls are generally more + efficient. * `chunk` - Enables [[chunking]] when storing large files. diff --git a/doc/tips/fully_encrypted_git_repositories_with_gcrypt.mdwn b/doc/tips/fully_encrypted_git_repositories_with_gcrypt.mdwn index 7408286db4..4484d5bf21 100644 --- a/doc/tips/fully_encrypted_git_repositories_with_gcrypt.mdwn +++ b/doc/tips/fully_encrypted_git_repositories_with_gcrypt.mdwn @@ -13,7 +13,7 @@ repositories. ## prerequisites -* Install [git-remote-gcrypt](https://spwhitton.name/tech/code/git-remote-gcrypt/) +* Install [git-remote-gcrypt](https://spwhitton.name/tech/code/git-remote-gcrypt/). * Set up a gpg key. You might consider generating a special purpose key just for this use case, since you may end up wanting to put the key @@ -70,13 +70,17 @@ If you have a server that has ssh and rsync installed on it, you can set up an encrypted repository there. Works just like the encrypted drive except without the cable. +This example uses rsync urls in a form supported by git-remote-gcrypt since +version 1.4. Older versions won't work with the urls used here, consult +its documentation if you have to use an old version. + First, on the server, run: git init --bare encryptedrepo Now, in your existing git-annex repository, set up the encrypted remote: - git annex initremote encryptedrepo type=gcrypt gitrepo=rsync://my.server:/home/me/encryptedrepo keyid=$mykey + git annex initremote encryptedrepo type=gcrypt gitrepo=rsync://my.server/home/me/encryptedrepo keyid=$mykey git annex sync encryptedrepo (Remember to replace "$mykey" with the keyid of your gpg key.) @@ -100,7 +104,7 @@ used to encrypt it can check it out: git clone gcrypt::rsync://my.server/home/me/encryptedrepo myrepo cd myrepo - git annex enableremote encryptedrepo gitrepo=rsync://my.server:/home/me/encryptedrepo + git annex enableremote encryptedrepo gitrepo=rsync://my.server/home/me/encryptedrepo git annex get --from encryptedrepo ## private encrypted git remote on a git-lfs hosting site