git-https-push-with-token
Git push to HTTPS remote using token authentication — avoids SSH setup, works in CI/automated environments.
by wu-xiaochen★ 18 GitHub stars
Install git-https-push-with-token in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Git HTTPS Push with Token Authentication
The Problem
Git push to an HTTPS remote fails even when the token is embedded in the URL:
remote: authentication failed
fatal: Authentication failed for 'https://github.com/user/repo.git'
Key Insight (Gotcha)
Setting credential.helper overrides URL-embedded credentials.
Git's credential helper runs before the URL-embedded token is used. If credential.helper is configured, git uses that instead of the token in the URL.
Correct Approach
# 1. Set remote URL with token embedded (no trailing spaces or special chars)
git remote set-url origin "https://github.com/USER/REPO.git"
# Actually embed token:
git remote set-url origin "https://[email protected]/USER/REPO.git"
# 2. CRITICAL: Remove/override any credential helper that would override URL token
git config --unset credential.helper # Remove global/default helper
# 3. Now push will use the URL-embedded token
git push origin main
Alternative: Store credentials persistently
# Store credentials in a file (note: writes token in plain text)
git config credential.helper "store --file ~/.git-credentials"
echo "https://[email protected]" > ~/.git-credentials
chmod 600 ~/.git-credentials
git push origin main
Checklist When Push Asks for Password
- Token has correct permissions (repo scope for private repos)
- Token not expired or revoked
- URL is correct (not truncated, no extra chars)
-
credential.helperis unset or points to a store that has the right credentials -
git remote -vshows the expected URL with token
Debug
# See what git thinks the remote URL is
git remote -v
# See what credential helper is configured (global + local)
git config --list --show-origin | grep credential
# Test if credential helper is interfering
GIT_TRACE=1 git push origin main 2>&1 | grep -i credential
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the git-https-push-with-token skill do?
Git push to HTTPS remote using token authentication — avoids SSH setup, works in CI/automated environments.
How do I install the git-https-push-with-token skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the git-https-push-with-token skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…