From bb6213c80e3bf37e3f9122983738949e7c54d628 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Tue, 11 Apr 2023 19:20:37 -0400 Subject: [PATCH 1/2] Improve Repo Sharing Docs This was missing some key information on who should run what commands and what you need to run to decrypt a cloned repo (we should probably also write a `plural clone` command that compresses that into one command) --- .../sharing-git-repositories.md | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/pages/getting-started/manage-git-repositories/sharing-git-repositories.md b/pages/getting-started/manage-git-repositories/sharing-git-repositories.md index 7bd07210..8d960371 100644 --- a/pages/getting-started/manage-git-repositories/sharing-git-repositories.md +++ b/pages/getting-started/manage-git-repositories/sharing-git-repositories.md @@ -9,9 +9,12 @@ 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: ```shell {% showHeader=false %} plural crypto setup-keys --name @@ -21,7 +24,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 --email @@ -41,7 +44,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: + +``` +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: + +```sh +git clone +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. +* You can also share encryption in a more dirty way using `plural crypto export` and `plural crypto import` From f06528a525b39170a3c9d99f10d711852f10f456 Mon Sep 17 00:00:00 2001 From: Klink <85062+dogmar@users.noreply.github.com> Date: Thu, 15 Jun 2023 10:53:18 -0700 Subject: [PATCH 2/2] lint fix --- .../manage-git-repositories/sharing-git-repositories.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pages/getting-started/manage-git-repositories/sharing-git-repositories.md b/pages/getting-started/manage-git-repositories/sharing-git-repositories.md index 8d960371..3d3cf194 100644 --- a/pages/getting-started/manage-git-repositories/sharing-git-repositories.md +++ b/pages/getting-started/manage-git-repositories/sharing-git-repositories.md @@ -9,12 +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. - +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 -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 register, they should both run this command on their current machine: ```shell {% showHeader=false %} plural crypto setup-keys --name @@ -67,5 +66,5 @@ 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. -* You can also share encryption in a more dirty way using `plural crypto export` and `plural crypto import` +- 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. +- You can also share encryption in a more dirty way using `plural crypto export` and `plural crypto import`