Configuration¶
GitLab Access¶
Gitconductor uses a GitLab Personal Access Token to read groups, projects, and repository metadata.
To create a GitLab Personal Access Token:
Log in to GitLab.
Click your user icon.
Click Preferences in the dropdown.
Click Access tokens or Personal access tokens in the sidebar.
Click Add new token.
Select legacy if your GitLab instance asks for a token type.
Give the token a useful name.
Set an expiry date. For closed systems, the longest permissible expiry is usually easiest.
Select the scopes needed for your workflow:
read_userread_repositoryread_apiwrite_repository
Click Generate token.
Copy the token immediately; GitLab will not show it again.
For read-only inspection, you may not need every write scope. For recursive git commands such as push, the token and your git credentials must allow the operation on the target projects.
You can pass the token via an environment variable:
export GITCONDUCTOR_GITLAB_API_KEY=<my-private-key>
Settings File¶
Gitconductor can load settings from a TOML file. By default, the CLI looks for:
~/.config/gitconductor/gitconductor.toml
You can override this path with GITCONDUCTOR_CONFIG or the top-level
--cfg option.
Example:
gitconductor_gitlab_api_key = "glpat-..."
Environment Variables¶
GITCONDUCTOR_CONFIGPath to the Gitconductor TOML settings file.
GITCONDUCTOR_GITLAB_API_KEYGitLab Personal Access Token.
Saved Hierarchy State¶
After gitconductor clone runs, Gitconductor writes a .gitconductor.pkl
state file at the top of the cloned hierarchy. Later recursive commands load
that state and infer the current group, subgroup, or project from the current
working directory.
Use --state when you need to point a command at a specific saved hierarchy
state file.