-
Notifications
You must be signed in to change notification settings - Fork 0
Blueprints Git
The Git blueprint in Rinse, Wash, Repeat (RWR) allows you to clone and manage Git repositories as part of your system configuration. This page describes how to define and use the Git blueprint.
The Git blueprint follows a specific structure to define the repositories to be cloned and managed. Here’s an example of a Git blueprint in YAML format:
git:
- name: my-repo
action: clone
url: https://github.com/username/my-repo.git
branch: main
path: /path/to/clone/my-repo
private: false
- name: private-repo
action: clone
url: [email protected]:username/private-repo.git
branch: develop
path: /path/to/clone/private-repo
private: true
The following settings are available for each repository in the Git blueprint:
Setting | Required | Description |
---|---|---|
|
Yes |
A unique name for the repository |
|
Yes |
The action to perform ( |
|
Yes |
The URL of the Git repository to clone |
|
No |
The branch to clone (defaults to the repository’s default branch) |
|
Yes |
The local path where the repository should be cloned |
|
No |
Indicates whether the repository is private (defaults to |
To clone private repositories, you need to provide authentication details. RWR supports two authentication methods:
-
GitHub API Key: Set the
--gh-api-key
flag or configure therepository.gh_api_token
setting in the configuration file. -
SSH Key: Set the
--ssh-key
flag or configure therepository.ssh_private_key
setting in the configuration file. The SSH key should be base64 encoded.
Here are a few examples of using the Git blueprint in different formats:
git:
- name: my-repo
action: clone
url: https://github.com/username/my-repo.git
path: /path/to/clone/my-repo
{
"git": [
{
"name": "my-repo",
"action": "clone",
"url": "https://github.com/username/my-repo.git",
"path": "/path/to/clone/my-repo"
}
]
}
If you encounter issues while using the Git blueprint, consider the following:
-
Ensure that the repository URL is correct and accessible.
-
Verify that you have provided the necessary authentication details for private repositories.
-
Check that the specified local path for cloning the repository is valid and has the required permissions.
If the issue persists, please refer to the Troubleshooting section or reach out to the RWR community for assistance.