Git
Create a Secret for securing Git repository credentials
A Git repository is a central storage location for code, documentation, and related files. It lets developers track changes over time, collaborate on code by merging contributions from multiple developers, and maintain a history of modifications.
Prerequisites
To create a Secret for securing Git credentials, you need the following information.
Source system requirements
GITSYNC_USERNAME: The Git username used for authentication.
GITSYNC_PASSWORD: The password used for authentication.
Get these credentials from the Git provider account settings, or from an administrator.
Create a Secret to secure Git credentials
Step 1: Create a manifest file
Create a manifest file with the configuration details for your Git Secret.
name: ${{git-secret-name}}
version: v2alpha
type: secret
tags:
- ${{tag-1}}
- ${{tag-2}}
description: ${{secret-description}}
owner: ${{owner-id}}
secret:
type: key-value
data:
GITSYNC_USERNAME: ${{git-gitsync-username}}
GITSYNC_PASSWORD: ${{git-gitsync-password}}name: gitsecretsn
version: v2alpha
type: secret
tags:
- dataos:type:resource
- dataos:resource:secret
description: Secret for Git authentication
owner: iamgroottmdcio
secret:
type: key-value
data:
GITSYNC_PASSWORD: '**********'
GITSYNC_USERNAME: '**********'For more information about each attribute, refer to the configurations section.
Step 2: Apply the manifest
Use the apply command to create the Git Secret in DataOS.
Example Usage:
Step 3: Validate the Secret
Use the get command to verify the Git Secret in DataOS.
Expected Output:
To list all Secrets in the DataOS environment, run the following command.
Expected Output:
Delete the Secret
To delete the Git Secret, use one of the following commands:
Specify the Resource type and Secret name in the delete command.
Example Usage:
Last updated
Was this helpful?