psmux-plugins icon indicating copy to clipboard operation
psmux-plugins copied to clipboard

PPM asking for git authentication

Open haraldan opened this issue 5 months ago • 1 comments

PPM keeps asking me to sign in to Github for each plugin it is installing. When I close the sign in window, it downloads the plugin as a monorepo.

No authentication should be needed to clone public github repositories.

Image Image

haraldan avatar Jun 08 '26 14:06 haraldan

Hey @haraldan, thanks for the clear report and the screenshots, they made this easy to track down.

Here is what was actually happening. When ppm resolves a spec like psmux-plugins/psmux-continuum, it first tries to clone that exact repo directly. Since psmux-plugins is not a real GitHub org (it is only a mapping to the actual psmux/psmux-plugins monorepo), that clone was always going to fail. The problem is in how it fails. I confirmed with a direct probe against the git smart http endpoint that GitHub answers with 401 Unauthorized for that nonexistent path, not a clean 404. Git treats a 401 as "this might be a private repo, get me credentials" and hands off to whatever credential helper is configured. On a machine with Git Credential Manager and no cached GitHub token, that is exactly the interactive sign in window you saw. Canceling it aborts the clone, which is why ppm then fell back to downloading the whole monorepo, matching your description exactly.

Fixed in commit f2479bf. Two changes:

  1. Every git clone ppm runs now goes through a small wrapper that disables the credential helper and terminal prompts for that call (GIT_TERMINAL_PROMPT=0, GCM_INTERACTIVE=never, credential.helper= empty). A missing repo now fails in under half a second with a clean error instead of ever being able to prompt.
  2. ppm now recognizes when a spec's owner is a known monorepo alias (like psmux-plugins) up front and clones the monorepo directly, skipping the doomed individual repo probe entirely. This also closes a related concern raised in the #16 discussion about that guaranteed 404 probe.

I tested this in a sandboxed profile: installing psmux-plugins/psmux-sensible now succeeds with a single monorepo clone and zero prompts, and pointing ppm at a genuinely nonexistent spec fails cleanly and quickly with no auth window at all.

Please pull the latest main and let me know if you still see the prompt anywhere, but this should be fully resolved. Closing this out now. Thanks again for flagging it with such a clear repro.

psmux avatar Jul 17 '26 19:07 psmux