More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Push to GitHub When Git Push Fails

    1

    When git push can't sign in but you have a GitHub token, this pushes your commits through GitHub's API instead.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Push to GitHub When Git Push Fails

    Example session with this skill installed

    The git credential helper is broken on this server. I have a GITHUB_TOKEN. Push my current local HEAD on 'main' to 'origin/main' for the repo owner/webapp using the REST API.

    • Read your context and instructions
    • Compiled the push to github

    I have successfully pushed the local tree to GitHub using the Git Database API. The remote head was reconciled via tree matching, and a new commit has been created and linked.

    GitHub REST API Push Log

    StepActionStatusDetails
    1GET ReferenceSuccessRemote SHA: a1b2c3d...
    2Ancestry CheckSuccessFast-forward verified via merge-base
    3Diff CalculationSuccess3 files changed (2 modified, 1 added)
    4POST BlobsSuccessCreated 3 blobs for changed content
    5POST TreeSuccessNew Tree SHA: f6g7h8i...
    6POST CommitSuccessCommit SHA: z9y8x7w...
    7PATCH RefSuccessrefs/heads/main updated to z9y8x7w
    
    # Verification of final state
    # GET /repos/owner/webapp/git/refs/heads/main
    {
      "ref": "refs/heads/main",
      "object": {
        "sha": "z9y8x7w...",
        "type": "commit",
        "url": "https://api.github.com/repos/owner/webapp/git/commits/z9y8x7w..."
      }
    }
    

    Next steps

    1. Run git fetch origin locally to sync your local tracking branch with the new remote SHA.
    2. Verify the commit appears in the GitHub UI under the main branch.
    3. Clear the GITHUB_TOKEN from your environment if it is no longer needed.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Sometimes git itself can't push: no credential helper on the machine, a sandbox with only web access, an auth setup that would take longer to fix than the push is worth. If you have a GitHub API token, the same commits can be assembled through GitHub's API directly — upload the changed files, build the tree, create the commit, move the branch.

    Inside the package: the skill file with the full sequence and its preconditions, a small working Python implementation, and a table of the API calls in order. The edge cases are the valuable part, because they cost real debugging time: an empty repository refuses API pushes with a 409 until you seed it with one file through a different endpoint, and pushing a tree that's already identical to the remote fails with a 422 unless you check for that case first.

    A run goes like this: your repo must be committed and clean, and the remote must be behind you or matchable by tree — this method never force-pushes. The agent reads the remote branch, stops and reports "already up to date" if the remote head matches yours, uploads only the changed files with their correct file modes, builds the new commit on top of the remote head, and verifies the branch actually moved. The token comes from an environment variable and is never written into a file or a log.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.

    Fast-forward only; no force-pushes. Inefficient for commits with 1000+ files due to API rate limits. Not for large binaries exceeding API blob limits. Requires a clean working tree.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 6 days ago

    Accounts
    GitHubA GitHub personal access token
    Software
    GitPython 3.10+

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables

    Allowed Hosts

    api.github.com
    Listed6 days ago

    What's inside

    Frequently Asked Questions

    This skill is designed for environments where standard git protocols (SSH/HTTPS) are blocked or credentials cannot be stored. It reconstructs your local git state and pushes it via the GitHub REST API, allowing you to sync code from restricted CI/CD pipelines or sandboxed dev environments.

    The skill requires the Git CLI installed locally to analyze tree metadata and a GitHub Personal Access Token (PAT) with repository permissions. It is compatible with any AI agent capable of executing Python scripts and making outbound API calls.

    No, this skill is built for safety and only supports fast-forward updates. It verifies that your local HEAD is a direct descendant of the remote branch to prevent accidental data loss or overwriting team members' work.

    You receive the complete logic for state reconstruction, including specialized handling for blob creation, tree assembly, and error mitigation for 409/422 API responses. It also includes documentation on mapping file modes (like executables and symlinks) to the GitHub API.

    Yes, the skill includes a specific 'seeding' workflow. It detects empty repositories and uses the Contents API to initialize the first commit, bypassing the common errors that occur when the Git Database API tries to reference a non-existent parent.

    The skill is subject to GitHub's REST API limits, specifically regarding file blob sizes and the number of files per tree update. It is ideal for standard code changes but may require multiple batches for extremely large binary assets or thousands of files.

    New in DevOps & Cloud