Github Copilot interactive login #4416

Closed
opened 2026-02-16 17:43:43 -05:00 by yindo · 4 comments
Owner

Originally created by @Midwayne on GitHub (Jan 8, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

I'm having issues with using Github Copilot as my provider. I want to be able to use the interactive login rather than providing the api key since I don't have access for the same in my company. I recall that the "Github deployment type" option used to show up before, but now it just asks me to enter my API key.

Image

Any idea on how I could use github.com rather than enter my API key?

Originally created by @Midwayne on GitHub (Jan 8, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question I'm having issues with using Github Copilot as my provider. I want to be able to use the interactive login rather than providing the api key since I don't have access for the same in my company. I recall that the "Github deployment type" option used to show up before, but now it just asks me to enter my API key. <img width="320" height="210" alt="Image" src="https://github.com/user-attachments/assets/ab67cb72-875d-461a-a5a9-b8af0eb025d0" /> Any idea on how I could use github.com rather than enter my API key?
yindo closed this issue 2026-02-16 17:43:43 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #3936: Github Enterprise authorization - Users attempting GitHub Enterprise login with GitHub Copilot are experiencing device authorization failures and encountering missing deployment type selection options

Feel free to ignore if your specific case differs from these issues.

@github-actions[bot] commented on GitHub (Jan 8, 2026): This issue might be a duplicate of existing issues. Please check: - #3936: Github Enterprise authorization - Users attempting GitHub Enterprise login with GitHub Copilot are experiencing device authorization failures and encountering missing deployment type selection options Feel free to ignore if your specific case differs from these issues.
Author
Owner

@mcking-07 commented on GitHub (Jan 8, 2026):

Yes, this interactive login option absolutely exists, and it's integrated into opencode via the opencode-copilot-auth plugin. You should see an authentication option called login with github copilot not just api key.

You can try:

  1. Checking if default plugins are disabled (env variable OPENCODE_DISABLE_DEFAULT_PLUGINS)
  2. Running opencode -> /models -> ctrl + a (to add a provider) and then configure

If these don't work, try adding the plugin explicitly in your opencode.json:

{
  "plugin": ["opencode-copilot-auth@0.0.9"]
}
@mcking-07 commented on GitHub (Jan 8, 2026): Yes, this interactive login option absolutely exists, and it's integrated into opencode via the `opencode-copilot-auth` plugin. You should see an authentication option called login with github copilot not just api key. You can try: 1. Checking if default plugins are disabled (env variable OPENCODE_DISABLE_DEFAULT_PLUGINS) 2. Running opencode -> `/models` -> `ctrl + a` (to add a provider) and then configure If these don't work, try adding the plugin explicitly in your `opencode.json`: ```json { "plugin": ["opencode-copilot-auth@0.0.9"] } ```
Author
Owner

@PerGon commented on GitHub (Jan 8, 2026):

I just had the same issue - after some debugging I found that opencode was trying to download the plugins and failing (because of some config I had in my ~/.npmrc).

If you try to run opencode --print-logs auth login, you might see something like this:

opencode --print-logs auth login
(...)

┌  Add credential
INFO  2026-01-08T23:40:37 +7ms service=models.dev file={} refreshing
    
(...)

INFO  2026-01-08T23:40:37 +5ms service=models.dev file={} refreshing
│
◆  Select provider

│  Search: _
│  ● OpenCode Zen (recommended)
│  ○ Anthropic
│  ○ GitHub Copilot
│  ○ OpenAI
│  ○ Google
│  ○ OpenRouter
│  ○ Vercel AI Gateway
│  ...
│  ↑/↓ to select • Enter: confirm • Type: to search
└INFO  2026-01-08T23:40:37 +141ms service=bun code=1 stdout=bun add v1.3.5 (1e86cebd)
 stderr=Resolving dependencies
Resolved, downloaded and extracted [1]
error: GET https://artifactory.my_org.com/artifactory/api/npm/npm-repo/@opencode-ai%2fplugin - 401
 done
INFO  2026-01-08T23:40:37 +0ms service=bun cmd=["/Users/pergon/.opencode/bin/opencode","install"] cwd=/Users/pergon/.config/opencode running
INFO  2026-01-08T23:40:37 +10ms service=bun code=1 stdout=bun add v1.3.5 (1e86cebd)
 stderr=Resolving dependencies
Resolved, downloaded and extracted [1]
error: GET https://artifactory.my_org.com/artifactory/api/npm/npm-repo/@opencode-ai%2fplugin - 401
■  Select provider
│

Note the error with an HTTP 401.

If that's your case, you can temporarily rename the ~/.npmrc just to see if it starts working.

@PerGon commented on GitHub (Jan 8, 2026): I just had the same issue - after some debugging I found that `opencode` was trying to download the plugins and failing (because of some config I had in my `~/.npmrc`). If you try to run `opencode --print-logs auth login`, you might see something like this: ``` opencode --print-logs auth login (...) ┌ Add credential INFO 2026-01-08T23:40:37 +7ms service=models.dev file={} refreshing (...) INFO 2026-01-08T23:40:37 +5ms service=models.dev file={} refreshing │ ◆ Select provider │ Search: _ │ ● OpenCode Zen (recommended) │ ○ Anthropic │ ○ GitHub Copilot │ ○ OpenAI │ ○ Google │ ○ OpenRouter │ ○ Vercel AI Gateway │ ... │ ↑/↓ to select • Enter: confirm • Type: to search └INFO 2026-01-08T23:40:37 +141ms service=bun code=1 stdout=bun add v1.3.5 (1e86cebd) stderr=Resolving dependencies Resolved, downloaded and extracted [1] error: GET https://artifactory.my_org.com/artifactory/api/npm/npm-repo/@opencode-ai%2fplugin - 401 done INFO 2026-01-08T23:40:37 +0ms service=bun cmd=["/Users/pergon/.opencode/bin/opencode","install"] cwd=/Users/pergon/.config/opencode running INFO 2026-01-08T23:40:37 +10ms service=bun code=1 stdout=bun add v1.3.5 (1e86cebd) stderr=Resolving dependencies Resolved, downloaded and extracted [1] error: GET https://artifactory.my_org.com/artifactory/api/npm/npm-repo/@opencode-ai%2fplugin - 401 ■ Select provider │ ``` Note the error with an HTTP 401. If that's your case, you can temporarily rename the `~/.npmrc` just to see if it starts working.
Author
Owner

@Midwayne commented on GitHub (Jan 9, 2026):

@mcking-07 I tried the steps you shared and still hit the issue, so I raised a issue.

@PerGon Thanks, this worked. It looks like the failure was caused by my company registry configured in .npmrc. As a temporary workaround, I switched the registry to the default npm registry during setup and then reverted it afterward.

@Midwayne commented on GitHub (Jan 9, 2026): @mcking-07 I tried the steps you shared and still hit the issue, so I raised a issue. @PerGon Thanks, this worked. It looks like the failure was caused by my company registry configured in .npmrc. As a temporary workaround, I switched the registry to the default npm registry during setup and then reverted it afterward.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4416