Skip to content

Improve Repo Sharing Docs #184

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: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ The encryption key is automatically generated by Plural and stored in Plural's c

## Sharing a Plural Git Repository

Let's consider a case where Alice wants to share her repository with a teammate Bob. She wants to use our managed age encryption to do that fully securely. There are three steps to this.

### Register a public key

To register a key for your current machine, run:
First, Alice and Bob both need to register age keypairs with plural. To do that register, they should both run this command on their current machine:
Copy link
Collaborator

@dogmar dogmar Jun 15, 2023

Choose a reason for hiding this comment

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

Suggested change
First, Alice and Bob both need to register age keypairs with plural. To do that register, they should both run this command on their current machine:
First, Alice and Bob both need to register age keypairs with Plural. To do that registration, they should both run this command on their current machine:


```shell {% showHeader=false %}
plural crypto setup-keys --name <name-for-key-pair>
Expand All @@ -21,7 +23,7 @@ This will generate a new keypair and automatically register the public key with

### Share the repository

To share a repo, use the following command:
To share a repo, Alice will run the following command on her already decrypted repo:

```shell {% showHeader=false %}
plural crypto share --email <email1> --email <email2>
Expand All @@ -41,7 +43,28 @@ If you have the Plural Console deployed, run:

```shell {% showHeader=false %}
plural build --only console
plural deploy
git add . && git commit -m "set up encryption"
plural deploy --commit "set up encryption"
```

Regardless, whether the console is installed or not, you should be sure the files written locally were pushed upstream, which can also be done with:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Regardless, whether the console is installed or not, you should be sure the files written locally were pushed upstream, which can also be done with:
Regardless of whether the console is installed or not, you should ensure the locally-written files were pushed upstream, which can be done with:


```
git add .
git commit -m "set up age encryption"
git push
```

### Bob Decrypts the Repository

Now that the keypairs are registered, and repo encryption has moved to using age, Bob should be able to freely decrypt the repo, which is done simply by:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Now that the keypairs are registered, and repo encryption has moved to using age, Bob should be able to freely decrypt the repo, which is done simply by:
Now that the keypairs are registered and repo encryption has moved to using age, Bob should be able to freely decrypt the repo, which is done simply by:


```sh
git clone <your-git-url>
plural crpyto init
plural crypto unlock
```

### Helpful Hints

- Encryption keys are stored locally or in plural's keybackups, so if new teammate gets a new machine, you'll likely need to do this process again for that teammate.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Encryption keys are stored locally or in plural's keybackups, so if new teammate gets a new machine, you'll likely need to do this process again for that teammate.
- Encryption keys are stored locally or in Plural's keybackups, so if a new teammate gets a new machine, you'll likely need to do this process again for that teammate.

- You can also share encryption in a more dirty way using `plural crypto export` and `plural crypto import`