docs: Add password-protected SSH keys information

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
This commit is contained in:
Paulo Gomes 2022-07-01 11:19:41 +01:00
parent 02567049e6
commit 87fba45aa2
No known key found for this signature in database
GPG Key ID: 9995233870E99BEE
1 changed files with 21 additions and 4 deletions

View File

@ -152,7 +152,7 @@ data:
#### SSH authentication #### SSH authentication
To authenticate towards a Git repository over SSH, the referenced Secret is To authenticate towards a Git repository over SSH, the referenced Secret is
expected to contain `.data.identity` and `known_hosts` fields. With the respective expected to contain `identity` and `known_hosts` fields. With the respective
private key of the SSH key pair, and the host keys of the Git repository. private key of the SSH key pair, and the host keys of the Git repository.
```yaml ```yaml
@ -162,11 +162,28 @@ kind: Secret
metadata: metadata:
name: ssh-credentials name: ssh-credentials
type: Opaque type: Opaque
data: stringData:
identity: <BASE64> identity: |
known_hosts: <BASE64> -----BEGIN OPENSSH PRIVATE KEY-----
...
-----END OPENSSH PRIVATE KEY-----
known_hosts: |
github.com ecdsa-sha2-nistp256 AAAA...
``` ```
Alternatively, the Flux CLI can be used to automatically create the
secret, and also populate the known_hosts:
```sh
flux create secret git podinfo-auth \
--url=ssh://git@github.com/stefanprodan/podinfo \
--private-key-file=./identity
```
For password-protected SSH private keys, the password must be provided
via an additional `password` field in the secret. Flux CLI also supports
this via the `--password` flag.
### Interval ### Interval
`.spec.interval` is a required field that specifies the interval at which the `.spec.interval` is a required field that specifies the interval at which the