enhance Private Repo docs in README
This commit is contained in:
parent
cab6a5531f
commit
6d277e052d
36
README.md
36
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 <ssh-private-key-file>
|
||||
$ truncate -s -1 <ssh-private-key-file>
|
||||
```
|
||||
|
||||
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 \
|
||||
<ssh-private-key-file>
|
||||
$ DOCKER_CONTEXT=example.org docker secret create example_org_deploy_key_v1 /path/to/ssh-private-key
|
||||
```
|
||||
|
||||
Run `abra app secret ls <domain>` 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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user