aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.rst
diff options
context:
space:
mode:
authorJoey Hess <id@joeyh.name>2021-01-20 11:23:01 -0400
committerSean Whitton <spwhitton@spwhitton.name>2021-01-20 13:25:58 -0700
commit3b69f816c9c371e935544b87cf2f321fdd795486 (patch)
treefc7cb25d717ae9c87a8fe7009a38c769119dce5a /README.rst
parentde7db5f9e6a10110ef3bb06935f6ea4c8b05726c (diff)
downloadgit-remote-gcrypt-3b69f816c9c371e935544b87cf2f321fdd795486.tar.gz
support more standard rsync URIs
This adds support for "rsync://user@host/path", which is a valid URI, and will be parseable by URI parsers, unlike the old "rsync://user@host:path", which at least some URI parsers will reject due to the ":path" looking like an unparseable port number. The old nonstandard URI form is also still accepted. Note that, the path in the new URI form is not relative to the home directory, but absolute. This is necessary because "/path" looks like an absolute directory, and there needs to be a way to specify an absolute directory. Something like "/~/path" could be added to specify the home directory, but seems like an unncessary complication. Note that rsync supports rsync:// URIs itself, but those communicate with a rsync daemon on its own port, rather than via ssh. gcrypt already was using rsync:// to denote rsync over ssh, and this does not change that. So, the url has to be rewritten from "rsync://user@host/path" to the rsync location "user@host:/path" I used this test suite while developing the rather complicated sed expression, to make sure I did not break handling of the old URI form. set -e test $(rsynclocation "rsync://host/path/foo") = host:/path/foo test $(rsynclocation "rsync://host:path/foo") = host:path/foo test $(rsynclocation "rsync://user@host/path/foo") = user@host:/path/foo test $(rsynclocation "rsync://user@host:path/foo") = user@host:path/foo test $(rsynclocation "rsync://user@host/path:foo") = user@host:/path:foo test $(rsynclocation "rsync://user@host:path:foo") = user@host:path:foo test $(rsynclocation "rsync://user@host/path:foo/bar") = user@host:/path:foo/bar test $(rsynclocation "rsync://user@host:path:foo/bar") = user@host:path:foo/bar test $(rsynclocation "rsync://user@host/path/foo/bar") = user@host:/path/foo/bar test $(rsynclocation "rsync://user@host:path/foo/bar") = user@host:path/foo/bar Signed-off-by: Joey Hess <id@joeyh.name>
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst14
1 files changed, 8 insertions, 6 deletions
diff --git a/README.rst b/README.rst
index 097c05c..a86d567 100644
--- a/README.rst
+++ b/README.rst
@@ -40,7 +40,7 @@ Quickstart
Create an encrypted remote by pushing to it::
- git remote add cryptremote gcrypt::rsync://example.com:repo
+ git remote add cryptremote gcrypt::rsync://example.com/repo
git push cryptremote master
> gcrypt: Setting up new repository
> gcrypt: Remote ID is :id:7VigUnLVYVtZx8oir34R
@@ -116,7 +116,7 @@ Examples
How to set up a remote for two participants::
- git remote add cryptremote gcrypt::rsync://example.com:repo
+ git remote add cryptremote gcrypt::rsync://example.com/repo
git config remote.cryptremote.gcrypt-participants "KEY1 KEY2"
git push cryptremote master
@@ -163,10 +163,12 @@ Performance
repository hosting service like Gitolite, GitHub or GitLab.
rsync URIs
- Note that the URI format for the rsync backend is, regretably,
- non-standard. git-remote-gcrypt uses ``rsync://user@host:path``
- whereas plain rsync uses either ``user@host:path`` or
- ``rsync://user@host/path``.
+ The URI format for the rsync backend is ``rsync://user@host/path``,
+ which translates to the rsync location ``user@host:/path``,
+ accessed over ssh. Note that the path is absolute, not relative to the
+ home directory. An earlier non-standard URI format is also supported:
+ ``rsync://user@host:path``, which translates to the rsync location
+ ``user@host:path``
rclone backend
In addition to adding the rclone backend as a remote with URI like