Claude-skill-registry configure-git-cli
Configure Git CLI with GitHub authentication using environment variables (GITHUB_EMAIL, GITHUB_NAME, GITHUB_PAT)
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/configure-git-cli" ~/.claude/skills/majiayu000-claude-skill-registry-configure-git-cli && rm -rf "$T"
manifest:
skills/data/configure-git-cli/SKILL.mdsource content
Configure Git CLI
When to use this skill
Use this skill before performing git operations (clone, push, commit, etc.). Required by the
codebase-fix-and-pr skill.
Prerequisites
Required environment variables:
: Email address for git commitsGITHUB_EMAIL
: Name for git commitsGITHUB_NAME
: GitHub Personal Access Token with repo and workflow scopesGITHUB_PAT
Workflow
Step 1: Verify Git Installation
git --version
Step 2: Configure Git User Identity
git config --global user.email "${GITHUB_EMAIL}" git config --global user.name "${GITHUB_NAME}"
Step 3: Configure Credentials
Enable credential storage and preload GitHub credentials:
git config --global credential.helper store cat <<EOF > ~/.git-credentials https://${GITHUB_NAME}:${GITHUB_PAT}@github.com EOF chmod 600 ~/.git-credentials
Step 4: Verify Configuration
git config user.email git config user.name git ls-remote https://github.com/test/test.git
All commands should succeed without prompting for credentials.
Success Criteria
- ✅
succeedsgit --version - ✅
andgit config user.email
return correct valuesgit config user.name - ✅
succeeds without promptinggit ls-remote
Troubleshooting
| Issue | Solution |
|---|---|
| Git not found | Install git using your system package manager |
| Authentication failed | Verify GITHUB_PAT is valid, not expired, and has repo scope |
| Permission denied | Check write permissions to home directory |
| Credentials not working | Run and reconfigure |