Skip to content

Commit

Permalink
Review synchronizing templates, now with the new setting
Browse files Browse the repository at this point in the history
  • Loading branch information
asteflova committed Nov 7, 2024
1 parent 2068da9 commit 6fb9e02
Showing 1 changed file with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,40 @@ If you store templates in a repository under a version control system, you can s
In this procedure, a Git repository is used for demonstration purposes.

.Procedure
. Configure connection to the repository.
Skip this step if you want to use an HTTP proxy, an HTTPS proxy, or a regular HTTP connection to connect to the repository.
.. To use HTTPS to connect to the repository if your Git server uses a self-signed certificate authority (CA):
... Create a new directory under the `/usr/share/foreman/` directory to store the Git configuration for 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"]
----
# mkdir --parents /usr/share/foreman/.config/git
----
... Create a file named `config` in the new directory:
.. Create a file named `config` in the new directory:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# touch /usr/share/foreman/.config/git/config
----
... Allow the `foreman` user access to the `.config` directory:
.. Allow the `foreman` user access to the `.config` directory:
+
[options="nowrap" subs="+quotes,verbatim,attributes"]
----
# chown --recursive foreman /usr/share/foreman/.config
----
... Update the Git global configuration for the `foreman` user with the path to your self-signed CA certificate:
.. 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 --user foreman git config --global http.sslCAPath _Path_To_CA_Certificate_
----
.. To use SSH to connect to the repository:
... Create an SSH key pair if you do not already have it.
. 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.
+
----
# sudo --user foreman ssh-keygen
----
... Configure your version control server with the public key from your {Project}, which resides in `/usr/share/foreman/.ssh/id_rsa.pub`.
... Accept the Git SSH host key as the `foreman` user:
.. Configure your version control server with the public key from your {Project}, which resides in `/usr/share/foreman/.ssh/id_rsa.pub`.
.. Accept the Git SSH host key as the `foreman` user:
+
[subs="+quotes"]
----
Expand All @@ -50,8 +48,9 @@ Do not specify a passphrase.
. In the {ProjectWebUI}, provide details for your Git repository:
.. Navigate to *Administer > Settings*.
.. Click the *Template Sync* tab.
.. Change the *Branch* setting to match the target branch of the repository.
.. Change the *Repo* setting to match the repository URL.
.. Change the *Branch* setting to define the target branch of the repository.
.. Change the *Repo* setting to define the repository URL.
.. If you want to use an HTTP proxy to connect to the repository, change the *HTTP proxy policy* setting to define your HTTP proxy policy.

.Next steps

Expand Down

0 comments on commit 6fb9e02

Please sign in to comment.