diff --git a/README.md b/README.md index 686d116..10462bf 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ When you deploy: * `/`: the Hugo site is served * `/deploy`: the webhook is behind HTTP basic auth -#### Private repository +#### Private Repository If you enable this in your `.env` file: @@ -60,30 +60,44 @@ SECRET_DEPLOY_KEY_VERSION=v1 Then you need to generate a SSH key: ``` -ssh-keygen -a 100 -t ed25519 +$ ssh-keygen -a 100 -t ed25519 ``` Then, you need to remove the final newline of the file: ``` -truncate -s -1 +$ truncate -s -1 ``` -And due to a limitation in `abra` ([can't insert files yet](https://git.coopcloud.tech/coop-cloud/organising/issues/586)), you'll have to manually insert the secret yourself: +Due to a limitation in `abra` ([can't insert files yet](https://git.coopcloud.tech/coop-cloud/organising/issues/586)), you'll have to manually ingest the privater key file with this command: ``` -DOCKER_CONTEXT=example.org \ - docker secret create \ - parasol-static-site_example_org_deploy_key_v1 \ - +$ DOCKER_CONTEXT=example.org docker secret create example_org_deploy_key_v1 /path/to/ssh-private-key ``` -Run `abra app secret ls ` to get a hint about the exact formatting of the secret name. +Assuming that completes with no errors, run the following command to confirm the +key was written to the server and look for `true` in the far right column: + +``` +$ abra app secret ls example.org + ++------------+---------+----------------------------+-------------------+ +| NAME | VERSION | GENERATED NAME | CREATED ON SERVER | ++------------+---------+----------------------------+-------------------+ +| deploy_key | v1 | example_org_deploy_key_v1 | true | ++------------+---------+----------------------------+-------------------+ +``` Then, you need to upload the public SSH key part to the Git repository settings -as a "Deploy key". In Gitea, that is `Repository Settings > Deploy keys`. +as a "Deploy key". In *Gitea*, that is located in: + +``` +Repository Settings > Deploy keys +``` + +You can then deploy and the deploy key will be loaded before cloning the private +repository and all should nicely. -You can then deploy and the deploy key will be loaded before cloning the private repository. #### HTTP Basic Auth & Private repository