1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/builds-source-secret-combinations-basic-auth-gitconfig.adoc

28 lines
817 B
Plaintext

// Module included in the following assemblies:
//
//* builds/creating-build-inputs.adoc
:_content-type: PROCEDURE
[id="builds-source-secret-combinations-basic-auth-gitconfig_{context}"]
= Creating a basic authentication secret with a .gitconfig file
You can combine the different methods for creating source clone secrets for your specific needs, such as a secret that combines a basic authentication and `.gitconfig` file.
.Prerequisites
* Basic authentication credentials
* `.gitconfig` file
.Procedure
* To create a basic authentication secret with a `.gitconfig` file, run:
+
[source,terminal]
----
$ oc create secret generic <secret_name> \
--from-literal=username=<user_name> \
--from-literal=password=<password> \
--from-file=</path/to/.gitconfig> \
--type=kubernetes.io/basic-auth
----