Skip to content
Skills Library
Programming · Analysis

push

/push

Use when running git push or diagnosing why a push failed. Especially when output mixes SSH transport with hook output (lefthook, husky, pre-commit), errors include "Permission denied (publickey)" or "rejected/non-fast-forward", a pre-push hook fails, or about to debug SSH with `-v`.

Licence
MIT
Last repository change
19.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 19.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when running git push or diagnosing why a push failed. Especially when output mixes SSH transport with hook output (lefthook, husky, pre-commit), errors include "Permission denied (publickey)" or "rejected/non-fast-forward", a pre-push hook fails, or about to debug SSH with `-v`.

Triggers from the description

Permission denied (publickey)rejected/non-fast-forward
Original author description

Use when running git push or diagnosing why a push failed. Especially when output mixes SSH transport with hook output (lefthook, husky, pre-commit), errors include "Permission denied (publickey)" or "rejected/non-fast-forward", a pre-push hook fails, or about to debug SSH with `-v`.

How it works

  1. Reading push failure output
  2. pre-push hook failures
  3. Debugging SSH
  4. Background push gotcha
Original SKILL.md headings · 53 lines, 309 words
SKILL.md preview
---
name: push
description: Use when running git push or diagnosing why a push failed. Especially when output mixes SSH transport with hook output (lefthook, husky, pre-commit), errors include "Permission denied (publickey)" or "rejected/non-fast-forward", a pre-push hook fails, or about to debug SSH with `-v`.
---

# Git Push

Preferences for `git push`, especially diagnosing failures.

## Reading push failure output

When `git push` exits non-zero, output mixes three layers:

- SSH/transport (key offered, accepted)
- Hook driver header (lefthook, husky, pre-commit, etc.)
- Hook output (test/lint/coverage walls)

Identify the failed layer before debugging:

- `lefthook` or `hook: pre-push` → pre-push hook failed; transport was fine
- `Permission denied (publickey)` → SSH auth refused
- `! [rejected]` / `non-fast-forward` → push needs rebase

A wall of test or coverage output is NOT an SSH problem. The hook ran tests, the tests failed, the push was blocked.

## pre-push hook failures

Same rules as `pre-commit failures` in the commit skill: analyze the failures, autofix when possible, ask the user when unclear. Do NOT skip with `--no-verify` without explicit confirmation.

## Debugging SSH

Before adding `-v` to debug an SSH issue, check whether `core.sshCommand` is configured:

```
git config --get core.sshCommand
```

If it returns nothing, `GIT_SSH_COMMAND="ssh -v" git push origin <branch>` is fine.

If it returns *anything* (custom IdentityFile, IdentityAgent, deploy-key flags, etc.), DO NOT use `GIT_SSH_COMMAND="ssh -v"`. It REPLACES `core.sshCommand` entirely, dropping every flag. Output will look like the wrong keys are being offered, because they are, but only because you removed the constraint.

Append `-v` to the existing command instead:

```
GIT_SSH_COMMAND="$(git config core.sshCommand) -v" git push origin <branch>
```

## Background push gotcha

If you started a push with `run_in_background` and then ran a foreground retry (e.g., because the first looked stuck), the background push may have already succeeded. Before re-investigating "why is push failing":

1. `git -C <worktree> log --oneline origin/<branch>..HEAD`. Empty output means the push went through.
2. Verify retry's cwd: `pwd` and `git rev-parse --show-toplevel`.
3. `gh pr view <pr>` to see if the commit landed.

Don't escalate to "SSH might be broken" before confirming the push didn't already complete.

Versions

RepositoryScoreLicence
This page · technicalpickles/pickled-claude-plugins100MIT
AsiaOstrich/universal-dev-standards100MIT
hamedmp/matrix-os100AGPL-3.0
AsiaOstrich/universal-dev-standards100MIT
AsiaOstrich/universal-dev-standards100MIT
JQ-WCoding/devkit100MIT
Mooshieblob1/MooshieUI100AGPL-3.0
AsiaOstrich/universal-dev-standards100MIT
tibursocampos/agent-dev-toolkit100MIT

Database snapshot: 13.11.2026 · package version 36d71aabb923 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100lefthook
    Fast Git hooks manager written in Go. Use when a user asks to set up Git hooks without Node.js dependency, run parallel pre-commit checks, or find a faster alternative to Husky.
  • 95dx-git-hooks-setup
    Use when setting up pre-commit and pre-push git hooks on any project (JS/TS, Go, shell scripts, or mixed), auditing whether an existing hook setup meets minimum requirements, or adding new mandatory checks to existing hooks. Triggered by "set up commit hooks", "add pre-commit…
  • 100husky-and-hooks
    Use this skill when the user says 'git hooks', 'husky', 'lint-staged', 'pre-commit hook', 'commit-msg hook', 'commitlint', 'pre-push', 'lefthook', 'pre-commit framework', 'hooks not running', 'skip hooks', 'core.hooksPath'. Sets up and debugs client-side Git hooks: how hooks…
  • 100setup-pre-commit
    Install git pre-commit hooks via the project's hook tool — Husky+lint-staged (JS), pre-commit (Python/OCaml), lefthook (Go), cargo-husky (Rust). Use when the user wants commit-time formatting, linting, type-checking, or test gates. Detects ecosystem first.
  • 100lefthook
    This skill should be used when the user asks to "configure git hooks", "set up lefthook", "add a pre-commit hook", "create a lefthook config", "install git hooks", or mentions lefthook, .lefthook.yml, git hooks management, or hook enforcement in the context of Plexium or any project using Lefthook.
  • 100git-hooks-setup
    Use when setting up git hooks (pre-commit, commit-msg, pre-push) with husky or native hooks for linting, formatting, commit conventions, and secret scanning.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.