Conversation
Here is an example of how to use attic serve's --restrict-to-path option to securely automate operations over SSH. It is for the Remote section of the quickstart guide.
This provides an example of how to use attic serve --restrict to path to restrict the use of an SSH keypair for automating remote backups. There is also a change to allow for automatic usage documentation of serve with sphinx.
docs/usage.rst
Outdated
There was a problem hiding this comment.
maybe use the same repository path in quickstart.rst and in usage.rst (and see elsewhere, what is usually used).
There was a problem hiding this comment.
I was actually wondering about that. I was struggling to keep everything
under 80 columns wide. Is that a relevant style restriction for this
project? And if so, how should I wrap the text in the examples? With a
'' like in the shell?
On Thu, Apr 09, 2015 at 03:44:45AM -0700, TW wrote:
@@ -167,3 +167,14 @@ Examples
New passphrase:
Enter same passphrase again:
Key file "/home/USER/.attic/keys/tmp_encrypted_repo" updated
+
+.. include:: usage/serve.rst.inc
+
+Examples
+~~~~~~~~
+::
+
Allow an SSH keypair to only run attic, and only have access to repo.attic
This will help to secure an automated remote backup system.
- $ cat ~/.ssh/authorized_keys
- command="attic serve --restrict-to-path /path/to/repo.attic" ssh-rsa AAAAB3[...]
maybe use the same repository path in quickstart.rst and in usage.rst (and see elsewhere, what is usually used).
Reply to this email directly or view it on GitHub:
https://github.com/jborg/attic/pull/277/files#r28051664
Now, all the examples on each page will use the same repository name, respective to each page.
|
I updated this to use a consistent repo name within each page of the set: usage.rst and quickstart.rst. I think that addressing this kind of detail throughout the documentation should be another task. This pull request is really just about documenting this very important feature so that users do not ignore attic. |
Here is some documentation of how to use
attic serveand its option--restrict-to-pathto secure the use of an SSH keypair. This is an essential feature of any SSH-based automated system and I'm sure others have wondered if attic offers this feature.This patch gives an explanation and example to the "Remote repositories" section of
quickstart.rstand some usage info and another example tousage.rst.I'm not sure the changes I made to
update_usage.share correct. Based on a comment inarchiver.py,serveseems to be a special case for the documentation system. As a result, there is no description generated for usage.rst. But this patch at least gives the usage info and an example for the usage page.