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

Manually set global Git configuration in proc to sync templates with an existing repo #3243

Merged
merged 5 commits into from
Sep 3, 2024
Merged
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,33 @@
Use this procedure to synchronize templates between your {ProjectServer} and an existing repository.

.Procedure
. If you want to use HTTPS to connect to the repository and you use a self-signed certificate authentication on your Git server, validate the certificate:
. If you want to use HTTPS to connect to the repository and you use a self-signed certificate authority (CA) on your Git server:
.. Create a new directory under the `/usr/share/foreman/` directory to store the Git configuration for the certificate:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# sudo -u foreman git config --global http.sslCAPath _Path_To_My_Certificate_
# mkdir -p /usr/share/foreman/.config/git
----
. If you want to use SSH to connect to the repository, perform the following steps:
.. Create a file named `config` in the new directory:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# touch /usr/share/foreman/.config/git/config
asteflova marked this conversation as resolved.
Show resolved Hide resolved
----
.. Allow the `foreman` user access to the `.config` directory:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# chown -R foreman /usr/share/foreman/.config
asteflova marked this conversation as resolved.
Show resolved Hide resolved
----
+
asteflova marked this conversation as resolved.
Show resolved Hide resolved
.. Update the Git global configuration for the `foreman` user with the path to your self-signed CA certificate:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# sudo -u foreman git config --global http.sslCAPath _Path_To_CA_Certificate_
----
. If you want to use SSH to connect to the repository:
.. Create an SSH key pair if you do not already have it.
Do not specify a passphrase.
+
Expand Down