ワンクリックで
git-auth-setup
Setup Git authentication for GitHub and GitLab (CLI, tokens, SSH keys)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Setup Git authentication for GitHub and GitLab (CLI, tokens, SSH keys)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | git-auth-setup |
| description | Setup Git authentication for GitHub and GitLab (CLI, tokens, SSH keys) |
| triggers | ["setup github","setup gitlab","configure git auth","git authentication"] |
Automated setup for GitHub and GitLab authentication including CLI tools, tokens, and SSH keys.
# Download and run
curl -O https://raw.githubusercontent.com/RiggdAI/tulsk-brain/main/skills/git-auth-setup/scripts/setup-git-auth.sh
chmod +x setup-git-auth.sh
# Setup GitHub only
./setup-git-auth.sh \
--github-token ghp_xxx \
--github-user myuser \
--email me@example.com \
--name "My Name"
# Setup both GitHub and GitLab
./setup-git-auth.sh \
--github-token ghp_xxx \
--gitlab-token glpat-xxx \
--github-user ghuser \
--gitlab-user gluser \
--email me@example.com \
--name "My Name"
Installs CLI tools (if not present)
gh) - for GitHub operationsglab) - for GitLab operationsConfigures git identity
user.name and user.emailStores tokens
~/.env for cross-profile accessGenerates SSH key (optional, default: yes)
~/.ssh/id_ed25519 if not existsVerifies authentication
| Flag | Description | Required |
|---|---|---|
--github-token TOKEN | GitHub personal access token | If using GitHub |
--gitlab-token TOKEN | GitLab personal access token | If using GitLab |
--github-user USER | GitHub username | Optional |
--gitlab-user USER | GitLab username | Optional |
--email EMAIL | Git commit email | Yes |
--name NAME | Git commit name | Yes |
--ssh-key-email EMAIL | Email for SSH key (default: git email) | No |
--no-ssh | Skip SSH key generation/upload | No |
repo - Full repository accessuser - Read user profileadmin:public_key - Manage SSH keys (for upload)api - Full API accessread_user - Read user profilewrite_ssh_key - Manage SSH keys (for upload)After setup, tokens are available via:
source ~/.env
# Use in scripts
gh repo list # Uses GITHUB_TOKEN
glab repo list # Uses GITLAB_TOKEN
Test SSH connections:
ssh -T git@github.com # Should show "Hi user! You've successfully authenticated"
ssh -T git@gitlab.com # Should show "Welcome to GitLab, @user!"
Clone via SSH:
git clone git@github.com:org/repo.git
git clone git@gitlab.com:org/repo.git
Each profile can have its own authentication:
# Profile 1
HERMES_PROFILE_DIR=~/.hermes-profile1 ./setup-git-auth.sh --github-token ghp_xxx ...
# Profile 2
HERMES_PROFILE_DIR=~/.hermes-profile2 ./setup-git-auth.sh --gitlab-token glpat-xxx ...
Token already exists on account - Script handles this gracefully (422 error)
No sudo access - Script downloads pre-built binaries to ~/.local/bin
SSH key upload fails - Check token has admin:public_key (GitHub) or write_ssh_key (GitLab) scope
gh/glab not found - Add ~/.local/bin to PATH: source ~/.bashrc
agent-git-identity - Git commit author configurationgithub-setup - GitHub-specific setup (LLM-guided version)messaging-platforms - Messaging platform authenticationscripts/setup-git-auth.sh - Main setup script