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..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,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: ```shell {% showHeader=false %} plural crypto setup-keys --name @@ -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 --email @@ -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: + +``` +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`