Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 3 additions & 32 deletions dev_guide/builds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -826,49 +826,20 @@ repository:
+
====
----
$ oc create -f secret.json
$ oc secrets new scmsecret ssh-privatekey=$HOME/.ssh/id_rsa
----
====

. The `*data*` field for the `*secret*` must contain your private key with the
value set to the base64-encoded content of that file:
+
====

----
$ base64 -w 0 $HOME/.ssh/id_rsa
6yJodHRwc1ovL2zuZGV4LmRvY21lci5aby92MS8iOnsiYXV0aCI6ImJXWnZhblJwYXpwdVoybGxkR2d4TUE9PSIsImVtYWlsIj8ibWlAbWlmby5zayJ9fQ==
----
====

. Copy the value returned from the above command and place it into the
`ssh-privatekey` field in `*_secret.json_*` file:
. Add the `*secret*` to the builder service account:
+
====

----
{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "scmsecret"
},
"data": {
"ssh-privatekey": "6yJodHRwc1ovL2zuZGV4LmRvY21lci5aby92MS8iOnsiYXV0aCI6ImJXWnZhblJwYXpwdVoybGxkR2d4TUE9PSIsImVtYWlsIj8ibWlAbWlmby5zayJ9fQ=="
},
"type": "Opaque"
}
$ oc secrets add serviceaccount/builder secrets/scmsecret
----
====

. Create a second `*secret*` for Docker from the *_secret.json_* file:
+
====

----
$ oc create -f secret.json
----
====

. Add a `*sourceSecret*` field into the `*source*` section inside the
buildConfig and set it to the name of the `*secret*` that you created, in this
Expand Down