Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about gitconfig username and email automatic update #2692

Merged
merged 7 commits into from
Mar 25, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
[id="mounting-git-configuration"]
= Mounting Git configuration

[NOTE]
====
The `user.name` and `user.email` fields will be set automatically to the `gitconfig` content from a git provider, connected to {prod-short} by a xref:using-a-git-provider-access-token.adoc[Git-provider access token] or a token generated via OAuth, if username and email are set on the provider's user profile page.
====
Follow the instructions below to mount a Git config file in a workspace.

.Prerequisites
Expand All @@ -31,11 +35,11 @@ metadata:
controller.devfile.io/mount-as: subpath
controller.devfile.io/mount-path: /etc/
data:
gitconfig: "[user] \n name = __<git_user_name>__ \n email = __<git_user_email>__" <2>
gitconfig: <gitconfig content> <2>
----
+
<1> A user namespace. Visit `pass:c,a,q[{prod-url}]/api/kubernetes/namespace` to get your {prod-short} user namespace as `name`.
<2> Your Git user name and email.
<2> The content of your gitconfig file content.

. Apply the ConfigMap.
+
Expand Down
Loading