git-vars package

`git-vars` Configuration

< >

git-vars Configuration

To configure the git-vars package, you need to provide the necessary configuration details. By default, this configuration is stored in the .git-vars file. Typically, this file is located in the user’s home directory, i.e., /home//.git-vars.

Steps to Configure git-vars

1. Run the Configuration Command:

git-vars configure --profile <PROFILE_NAME>

2. Provide Required Information:

When you execute the above command, you will be prompted to provide the following details:

  • GitLab Access Token: This is your personal access token for authenticating with GitLab.
  • GitLab Repository URL: The URL of the GitLab repository you want to manage.
  • GitLab Scope: Specify the scope of your GitLab access. The options typically are:
    • project: For repository-specific configurations.
    • group: For configurations applicable to all repositories within a group.
    • instance: For configurations that apply across the entire GitLab instance.

3. Profile Management:

The --profile option allows you to define and store multiple configurations in a single .git-vars file. Each profile can hold different configurations, which is useful if you work with multiple repositories or GitLab instances.

4. Configuration File Location:

By default, the .git-vars file is located in the user’s home directory. If you wish to use a different location, you may need to specify that in the git-vars configuration or environment settings.

Additional Notes:

  • Access Token: Ensure that your GitLab access token has the necessary permissions for the actions you want to perform (e.g., read and write access to environment variables).
  • Repository URL: The URL should be in the correct format, typically something like https://gitlab.com/namespace/project.
  • Scope Choices: The scope selection determines what level of access and control git-vars will have. Ensure you choose the appropriate scope based on your needs.