-
Notifications
You must be signed in to change notification settings - Fork 1.3k
plugin install ignores macOS system git credentials #2404
Copy link
Copy link
Closed
Labels
area:authenticationLogin, OAuth, device auth, token management, and keychain integrationLogin, OAuth, device auth, token management, and keychain integrationarea:installationInstalling, updating, versioning, PATH setup, and binary distributionInstalling, updating, versioning, PATH setup, and binary distributionarea:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agentsPlugin system, marketplace, hooks, skills, extensions, and custom agents
Metadata
Metadata
Assignees
Labels
area:authenticationLogin, OAuth, device auth, token management, and keychain integrationLogin, OAuth, device auth, token management, and keychain integrationarea:installationInstalling, updating, versioning, PATH setup, and binary distributionInstalling, updating, versioning, PATH setup, and binary distributionarea:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agentsPlugin system, marketplace, hooks, skills, extensions, and custom agents
Type
Fields
Give feedbackNo fields configured for Bug.
Describe the bug
When installing a plugin from a private Git host over HTTPS,
copilot plugin installfails with a redirect error — even whengit ls-remoteworks correctly against the same URL using system git credentials.The installer appears to spawn its own HTTP/git process that does not inherit macOS Keychain credentials, Git credential helpers (
osxkeychain), or credentials stored viagit config --global credential.helper store. As a result, the first unauthenticated request is redirected to the host's sign-in page, and the installer then attempts to clone that redirect URL verbatim instead of handling the 302 and retrying with credentials.Environment
Affected version
GitHub Copilot CLI 1.0.12
Steps to reproduce the behavior
osxkeychain(the macOS default)git ls-remote https://<private-git-host>/<org>/<repo>.gitworks correctly and returns refs without promptingcopilot plugin install https://<private-git-host>/<org>/<repo>.gitExpected behavior
copilot plugin installshould respect the system git credential chain, including:osxkeychain)git config --global credential.helper storegit config --global credential.<host>.usernameThis is consistent with how
git cloneandgit ls-remotebehave on the same machine.Additional context
The installer makes an unauthenticated request, receives a 302 redirect to
/users/sign_in, and then tries to clone that redirect URL instead of the original:A fix could involve:
gitbinary (which inherits all configured credential helpers)git credential fillbefore the clone attempt to pre-populate credentials