mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
27 lines
806 B
Plaintext
27 lines
806 B
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * builds/creating-build-inputs.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[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
|
|
* A `.gitconfig` file
|
|
|
|
.Procedure
|
|
|
|
* To create a SSH-based authentication secret with a `.gitconfig` file, enter the following command:
|
|
+
|
|
[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
|
|
----
|