1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 00:48:01 +01:00
Files
openshift-docs/modules/builds-source-secret-combinations-ssh-gitconfig.adoc

26 lines
743 B
Plaintext

// Module included in the following assemblies:
//
// * builds/creating-build-inputs.adoc
[id="builds-source-secret-combinations-ssh-gitconfig_{context}"]
= Creating a SSH-based authentication secret with a `.gitconfig` file
You can combine the different methods for creating source clone secrets for your specific needs, such as a SSH-based authentication secret with a `.gitconfig` file.
.Prerequisites
* SSH authentication
* .gitconfig file
.Procedure
* To create a SSH-based authentication secret with a `.gitconfig` file, run:
+
[source,terminal]
----
$ oc create secret generic <secret_name> \
--from-file=ssh-privatekey=<path/to/ssh/private/key> \
--from-file=<path/to/.gitconfig> \
--type=kubernetes.io/ssh-auth
----