Skip to content

plugin install fails copying .git/fsmonitor--daemon.ipc when git core.fsmonitor is enabled #3842

@simonfaltum

Description

@simonfaltum

copilot plugin install fails for me when git's core.fsmonitor is enabled globally. The clone step works, then the install dies while copying the clone into the installed-plugins directory because it tries to copy the fsmonitor daemon's socket file.

Environment

  • GitHub Copilot CLI 1.0.4
  • macOS (Darwin 25.4.0)
  • git with core.fsmonitor = true in the global config (~/.gitconfig)

Repro

  1. Make sure fsmonitor is on globally: git config --global core.fsmonitor true
  2. Install any plugin whose source clones from a GitHub repo, e.g.:
    copilot plugin marketplace add github/awesome-copilot
    copilot plugin install <plugin>@awesome-copilot
    
  3. The clone succeeds, then the install fails during the copy step.

Error

Unknown system error -102 ... copyfile '.git/fsmonitor--daemon.ipc'

-102 is macOS EOPNOTSUPP ("operation not supported on socket"), i.e. it's trying to copy a Unix domain socket.

What seems to be happening

The install clones the plugin repo into the marketplace cache, then copies that clone into the installed-plugins directory. Because core.fsmonitor is on globally, the fresh clone spawns git's fsmonitor daemon, which drops a Unix domain socket at .git/fsmonitor--daemon.ipc. The copy step then walks the tree and hits that socket. Sockets aren't regular files and can't be copied with a normal file copy, so the copy throws and leaves a partial install. Anyone running core.fsmonitor (common on large repos, and it's the default on some setups) hits this. Turning fsmonitor off makes the install succeed.

Workaround

Run the install with fsmonitor disabled just for that git operation, without touching the global setting:

GIT_CONFIG_GLOBAL=/path/to/fsmonitor-off.config copilot plugin install <plugin>@<marketplace>

where fsmonitor-off.config contains:

[core]
    fsmonitor = false

Suggested fix

I think the copy step shouldn't be copying .git/ into the installed plugin at all. The installed plugin doesn't need git metadata, let alone a live daemon socket, so excluding .git/ from the copy would fix this and shrink installs at the same time. If keeping .git/ is intentional, then skipping non-regular files (sockets and FIFOs) during the copy would also do it.

Happy to test a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions