gtl env connect gh
Parent command: gtl env connect.
Add or update the .envrc GitHub block for gh and update git author/committer identity from the selected GitHub account unless disabled. If the account name has a unique local match, interactive runs ask before using the matched account. Matched profiles record the canonical API login while keeping the local profile directory or token selector needed by gh.
Aliases
github
Usage
bash
gtl env connect gh <account> [flags]Examples
bash
gtl env connect gh work-gh
gtl env connect gh personal --config-dir '$HOME/.config/gh-personal'
gtl env connect gh work-gh --tokenFull Help
text
Add or update the .envrc GitHub block for gh and update git author/committer identity from the selected GitHub account unless disabled. If the account name has a unique local match, interactive runs ask before using the matched account. Matched profiles record the canonical API login while keeping the local profile directory or token selector needed by gh.
Usage:
gtl env connect gh <account> [flags]
Aliases:
gh, github
Examples:
gtl env connect gh work-gh
gtl env connect gh personal --config-dir '$HOME/.config/gh-personal'
gtl env connect gh work-gh --token
Flags:
--allow-new-account Skip logged-in account validation for a new GitHub account
--config-dir string GitHub CLI config directory to set as GH_CONFIG_DIR
--git-email string Git user.email to set locally (defaults to GitHub public email when available)
--git-name string Git user.name to set locally (defaults to GitHub name/login)
-h, --help help for gh
--host string GitHub host (default: github.com) (default "github.com")
--no-git-identity Do not set local Git commit identity
--token Use GH_TOKEN from 'gh auth token --user <account>' instead of GH_CONFIG_DIR