# Docker git bind mount push debug

> Docker git bind mount push debug is an open-source agent skill for developer tools. Debugs Git commit, fetch and push failures for repos bind-mounted into Docker containers. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/JinNing6/Noosphere/tree/main/shared_skills/active/docker-git-bind-mount-push-debug
- **Repository:** https://github.com/jinning6/noosphere
- **GitHub stars:** 18
- **License:** Apache-2.0
- **Skill name:** docker-git-bind-mount-push-debug
- **Collection:** https://github.com/JinNing6/Noosphere
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill helps an agent work out why Git operations succeed on the host but fail inside a container when the worktree or a bare remote is mounted from the host, a setup that often comes up on Docker Desktop for Windows. It walks through a fixed diagnostic order: checking the docker run arguments and bind sources, confirming the container stays alive across several docker exec calls, registering each mounted Git directory as safe, and rewriting remote URLs to container paths instead of host paths.

The skill also guards against false success. It warns that shell fallbacks such as a trailing echo can mask a failed push, and it asks the agent to read back the expected file or ref directly from the bare remote before trusting the result. It separates real permission or read-only denials from errors like a missing remote or bad refspec, and it recommends capturing UTF-8 output on Windows so Git errors are not hidden.

A completion checklist sets the bar for finishing: several consecutive exec calls succeed, authorized pushes land in the intended remote, protected writes fail at the mount boundary, and the workload container is removed afterward. Use it with Docker and Git available on the host.

## When your agent uses it

> Diagnose and validate Git commit, fetch, and push failures when worktrees or bare remotes are bind-mounted into Docker, especially on Docker Desktop for Windows. Use when commands work on the host but fail in a container with dubious ownership, wrong remote paths, read-only errors, vanished containers, or misleading success caused by shell fallbacks.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/JinNing6/Noosphere/tree/HEAD/shared_skills/active/docker-git-bind-mount-push-debug)
- [License: Apache-2.0](https://github.com/JinNing6/Noosphere/tree/HEAD/shared_skills/active/docker-git-bind-mount-push-debug)

## Features

- **Ordered mount diagnosis:** Walks through docker run arguments, bind sources, read-only flags and container lifecycle in a fixed order.
- **Container safe directory setup:** Shows how to register bind-mounted worktrees and bare remotes as safe directories inside the container.
- **Container remote addressing:** Explains why host paths fail in Linux containers and how to point remotes at container paths.
- **False success detection:** Verifies pushes by reading the expected object back from the bare remote rather than trusting exit codes.
- **Boundary error classification:** Separates real read-only or permission denials from missing remotes, bad refspecs and other errors.
- **Completion checklist:** Lists the conditions to confirm before agent integration, including mount policy tests and container cleanup.

## Good for

- Fix a git push that works on the host but fails with dubious ownership inside a Docker container
- Diagnose why a bind-mounted bare remote rejects writes with read-only errors
- Verify that a container-side push actually landed in the target bare repository
- Set up read-only and writable mounts so only the approved remote accepts commits
- Check why a Docker exec session vanished before a Git workflow finished

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/docker-git-bind-mount-push-debug` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JinNing6/Noosphere.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/docker-git-bind-mount-push-debug &&
cp -R "$tmp/shared_skills/active/docker-git-bind-mount-push-debug" ~/.claude/skills/docker-git-bind-mount-push-debug &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/docker-git-bind-mount-push-debug` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/docker-git-bind-mount-push-debug` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JinNing6/Noosphere.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/docker-git-bind-mount-push-debug &&
cp -R "$tmp/shared_skills/active/docker-git-bind-mount-push-debug" ~/.agents/skills/docker-git-bind-mount-push-debug &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/docker-git-bind-mount-push-debug` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/docker-git-bind-mount-push-debug` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JinNing6/Noosphere.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/docker-git-bind-mount-push-debug &&
cp -R "$tmp/shared_skills/active/docker-git-bind-mount-push-debug" ~/.cursor/skills/docker-git-bind-mount-push-debug &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/docker-git-bind-mount-push-debug` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/JinNing6/Noosphere.git --path shared_skills/active/docker-git-bind-mount-push-debug
```

Or copy the folder to `~/.gemini/skills/docker-git-bind-mount-push-debug` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/docker-git-bind-mount-push-debug`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JinNing6/Noosphere.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/docker-git-bind-mount-push-debug &&
cp -R "$tmp/shared_skills/active/docker-git-bind-mount-push-debug" ~/.copilot/skills/docker-git-bind-mount-push-debug &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/docker-git-bind-mount-push-debug` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/JinNing6/Noosphere.git
```

Then copy `Noosphere/shared_skills/active/docker-git-bind-mount-push-debug` into your agent's skills folder as `docker-git-bind-mount-push-debug`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Docker git bind mount push debug trigger?

It is meant for cases where Git commands work on the host but fail in a container with dubious ownership, wrong remote paths, read-only errors, vanished containers, or misleading success from shell fallbacks.

### What does the skill need to run?

The skill itself contains no scripts. It gives the agent a diagnostic procedure and shell commands that use docker and git, so both must be available.

### Does Docker git bind mount push debug change my repositories or containers?

It instructs the agent to run git config --global safe.directory entries inside the container and to remove the workload container at the end. It does not ship code that modifies anything on its own.

### Which clients can use Docker git bind mount push debug?

The skill follows the shared agent skills format without client-specific hooks or plugins, so it can be used by any supported coding agent.

### How do I install Docker git bind mount push debug in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/docker-git-bind-mount-push-debug to use it in all your projects, or to .claude/skills/docker-git-bind-mount-push-debug in one project.

### Does Docker git bind mount push debug run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Docker git bind mount push debug?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Docker git bind mount push debug?

The closest alternatives to Docker git bind mount push debug are Container ops edho ferdian, Dispatched bash agent git checkout clobbers uncommitted edit, Git workflow, Deploy from stale worktree silent rollback and Debugging and error recovery.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Container ops edho ferdian](https://ai-powered.com/skills/container-ops-edho-ferdian): Container ops edho ferdian is an open-source agent skill for cloud and infrastructure.
- [Dispatched bash agent git checkout clobbers uncommitted edit](https://ai-powered.com/skills/dispatched-bash-agent-git-checkout-clobbers-uncommitted-edit): Dispatched bash agent git checkout clobbers uncommitted edit is an open-source agent skill for developer tools.
- [Git workflow](https://ai-powered.com/skills/git-workflow-aws-solutions): Git workflow is an open-source agent skill for developer tools.
- [Deploy from stale worktree silent rollback](https://ai-powered.com/skills/deploy-from-stale-worktree-silent-rollback): Deploy from stale worktree silent rollback is an open-source agent skill for cloud and infrastructure.
- [Debugging and error recovery](https://ai-powered.com/skills/debugging-and-error-recovery): Debugging and error recovery is an open-source agent skill for developer tools.
- [Docker patterns](https://ai-powered.com/skills/docker-patterns): Docker patterns is an open-source agent skill for developer tools.
- [Sh kb ci cd](https://ai-powered.com/skills/sh-kb-ci-cd): Sh kb ci cd is an open-source agent skill for developer tools.
- [Flask debug cross worktree edit stale](https://ai-powered.com/skills/flask-debug-cross-worktree-edit-stale): Flask debug cross worktree edit stale is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/docker-git-bind-mount-push-debug
