Skip to content

Documentation for 'attic serve' #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Documentation for 'attic serve' #277

wants to merge 3 commits into from

Conversation

lfam
Copy link

@lfam lfam commented Apr 8, 2015

Here is some documentation of how to use attic serve and its option --restrict-to-path to 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.rst and some usage info and another example to usage.rst.

I'm not sure the changes I made to update_usage.sh are correct. Based on a comment in archiver.py, serve seems 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.

Leo Famulari added 2 commits April 6, 2015 19:55
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.
# 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[...]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use the same repository path in quickstart.rst and in usage.rst (and see elsewhere, what is usually used).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@lfam
Copy link
Author

lfam commented Apr 13, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants