Using Existing Git Repositories

This topic contains the following sections:

If you've existing Git repositories hosted on any standards-compliant Git distribution, such as OCI DevOps, GitHub, GitLab, Bitbucket, and so on, you can use it to provision Siebel CRM through SCM. To use existing Git repositories, in the Siebel CRM deployment payload:

  1. Set the git_type parameter to byo_git.
  2. Configure the byo_git section. For details of the parameters to include in the byo_git section, see Payload Parameters for Siebel CRM Deployment.

    In this case, SCM will override the data in the Git repositories; that is, it will delete existing data in the repositories and then commit SCM data.

    For an example, see the payloads in the "Example Git Section for BYO-Git" section of the Example Payload to Deploy Siebel CRM topic.

Configuring SSH Host-Key Verification

If you use SSH for a BYO Git deployment, you must provide a verified SHA-256 host-key fingerprint for each Git host. SCM uses the fingerprint to verify the Git server identity and creates a resource-specific known_hosts file:

/home/opc/siebel/<ENV_ID>/known_hosts

This configuration prevents interactive SSH trust prompts. Git operations fail when SCM cannot verify the configured Git server identity.

Note: You must obtain each fingerprint from the Git server administrator, or another trusted out-of-band source. Do not accept an unverified interactive SSH prompt.

When git_protocol_type is set to ssh, configure git_ssh_host_key_sha256 under the infrastructure.git.byo_git section. For example:

{
    "git_protocol_type": "ssh",
    "git_ssh_private_key": "/home/opc/.ssh/id_rsa",
    "git_ssh_host_key_sha256": {
        "git.example.com": "SHA256:<verified-fingerprint>"
    }
}

Use the host name as the key when the Git server uses SSH port 22. For a nondefault port, use host:port as the key:

{
    "git_ssh_host_key_sha256": {
        "git.example.com:2222": "SHA256:<verified-fingerprint>"
    }
}
Note:

You don’t need to configure git_ssh_host_key_sha256 when git_protocol_type is set to http, including when you use HTTPS repository URLs.

Supported SSH Repository URL Formats

SCM supports the ssh and http Git protocol types. When you use SSH, SCM supports the following repository URL formats:

Git Service Repository URL Format User Handling
OCI DevOps ssh://host/path/to/repository SCM uses the git_user value from the payload when the URL does not include a user.
GitLab standard SSH ssh://git@gitlab.example.com/group/repository.git SCM uses the Git user specified in the URL.
GitLab SCP-style SSH git@gitlab.example.com:group/repository.git SCM uses the Git user specified in the URL.

For HTTPS Git URLs, set git_protocol_type to http. Provide the applicable token and, when required, git_selfsigned_cacert.

Configuring SSH for Manual Git Operations

SCM automatically applies the required SSH settings for Git operations that it performs. Before you manually run a remote Git command from an SCM-managed working copy, you must set the GIT_SSH_COMMAND environment variable when git_protocol_type is set to ssh.

To set GIT_SSH_COMMAND in the active shell:

export GIT_SSH_COMMAND="ssh -F /home/opc/.ssh/config \
    -o IdentityFile=<git_ssh_private_key_path> \
    -o IdentitiesOnly=yes \
    -o StrictHostKeyChecking=yes \
    -o UserKnownHostsFile=/home/opc/siebel/<ENV_ID>/known_hosts \
    -o User=<git_user>"

In the above example:

  • Replace <ENV_ID>, <git_ssh_private_key_path>, and <git_user> with the values for the deployed environment.
  • Add the -p <port> option for a nondefault SSH port.
Note: Do not set GIT_SSH_COMMAND when git_protocol_type is set to http, including when the repository URL starts with https://. HTTP and HTTPS Git repositories continue to use the configured access token or credentials. When applicable, they also use git_selfsigned_cacert. SSH keys, SSH fingerprints, and known_hosts files do not apply.

Creating Standards-Compliant Git Repositories

Optionally, you can also create Git repositories on any standards-compliant Git distribution, such as OCI DevOps, GitHub, GitLab, Bitbucket, and so on before using them to provision Siebel CRM through SCM. For example, you can create Git repositories in OCI DevOps as follows:

  1. Log in to OCI Console.
  2. Create an OCI DevOps project. For detailed steps to create an OCI DevOps project, refer Creating a Project.
  3. Create repositories under the OCI DevOps project. For detailed steps to create repositories, refer Creating a Repository.