File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ data:
152152# ### SSH authentication
153153
154154To authenticate towards a Git repository over SSH, the referenced Secret is
155- expected to contain `.data. identity` and `known_hosts` fields. With the respective
155+ expected to contain `identity` and `known_hosts` fields. With the respective
156156private key of the SSH key pair, and the host keys of the Git repository.
157157
158158` ` ` yaml
@@ -162,11 +162,28 @@ kind: Secret
162162metadata:
163163 name: ssh-credentials
164164type: Opaque
165- data:
166- identity: <BASE64>
167- known_hosts: <BASE64>
165+ stringData:
166+ identity: |
167+ -----BEGIN OPENSSH PRIVATE KEY-----
168+ ...
169+ -----END OPENSSH PRIVATE KEY-----
170+ known_hosts: |
171+ github.com ecdsa-sha2-nistp256 AAAA...
172+ ` ` `
173+
174+ Alternatively, the Flux CLI can be used to automatically create the
175+ secret, and also populate the known_hosts :
176+
177+ ` ` ` sh
178+ flux create secret git podinfo-auth \
179+ --url=ssh://[email protected] /stefanprodan/podinfo \ 180+ --private-key-file=./identity
168181` ` `
169182
183+ For password-protected SSH private keys, the password must be provided
184+ via an additional `password` field in the secret. Flux CLI also supports
185+ this via the `--password` flag.
186+
170187# ## Interval
171188
172189` .spec.interval` is a required field that specifies the interval at which the
You can’t perform that action at this time.
0 commit comments