github-push

Push local commits to GitHub over SSH or HTTPS without exposing credentials.

13|6|Updated Aug 9, 2026
One-click install
npx skills add https://github.com/kaipingyang/CDISC_training --skill github-push-kaipingyang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-push
Source: https://github.com/kaipingyang/CDISC_training/tree/main/.claude/skills/github-push
Command: npx skills add https://github.com/kaipingyang/CDISC_training --skill github-push-kaipingyang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Pushing code to GitHub often fails due to network restrictions, missing SSH host keys, or misconfigured remotes, and handling tokens in commands risks leaking credentials into logs or chat history. This Skill provides a safe, repeatable push and pull workflow that never exposes token values. ## Core Features & Use Cases - Credential-safe pushing: Uses SSH keys or an HTTPS token referenced only via environment variables, with output masked by sed so no secret ever appears in logs. - Automatic channel selection: Prefers SSH over port 443 and falls back to HTTPS with a token loaded from ~/.Renviron when SSH fails. - Troubleshooting guidance: Diagnoses common failures such as port 443 connection errors, host key verification issues, and publickey permission denials. - Use Case: After committing changes locally, ask the assistant to push to GitHub; it checks for unpushed commits, selects the working channel, pushes, and verifies the remote is up to date. ## Quick Start Push my local commits to GitHub and confirm the remote branch is up to date.

Frequently Asked Questions about github-push

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I push commits to GitHub without exposing my token?

Reference the token only as an environment variable like ${GITHUB_TOKEN} in the push URL, never printing its value. Pipe command output through sed to mask any authenticated URL that appears in error messages.

How to push to GitHub when port 443 connection fails?

Use SSH over port 443 by configuring the remote as ssh://[email protected]:443/... instead of the standard HTTPS endpoint. This routes traffic through the SSH protocol on the HTTPS port, bypassing common network interference with direct github.com connections.

Why does git push fail with Host key verification failed?

This error means the SSH host key for the server is missing from your known_hosts file. Fix it by running ssh-keyscan -p 443 ssh.github.com and appending the result to ~/.ssh/known_hosts before retrying the push.

SSH vs HTTPS for git push, which should I use?

SSH is preferred when a registered key exists because it avoids embedding credentials in URLs entirely. HTTPS with a token is a fallback for environments where SSH is blocked or the key is not registered with GitHub.

What causes Permission denied (publickey) when pushing to GitHub?

This means your SSH private key is not registered with your GitHub account. Register the public key via the GitHub API endpoint POST /user/keys using your token, or switch to the HTTPS token-based push method.