3.7.2 Register YAML files with GitLab (CUI)
Perform the following operations in an environment where Git is installed. If the environment requires proxy settings, configure the proxy in advance.
Open Git from the working folder in the local environment.
(1) Create a clone of the GitLab repository in the local environment and synchronize the local environment with GitLab.
- Obtaining the GitLab URL
Go to the registration destination repository and click "Code". Click the copy button for "Clone with HTTPS" from the displayed menu to copy the GitLab URL.
The GitLab URL is in the following format.https://git.tenant name.ops-integration.com/group name/project name.git
*tenant name is information to identify the Ops I environment, and is included in the connection URL. - Obtaining GitLab access token
Obtain the GitLab access token. For how to obtain access tokens, see "Obtaining GitLab access tokens".
Insert "user name:GitLab access token@" directly after the :// of the GitLab URL as shown below, then execute the "git clone" command.# git clone https://user name:GitLab access token@git.tenant name.ops-integration.com/group name/project name.git
(2) Specify the files to add to the staging area.
# git add file path
(3) Confirm the commit target files.
# git status
(4) Commit to the local environment and push to the connected GitLab.
# git commit – m "comment"
# git push