You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Any idea on how I could use github.com rather than enter my API key?
Reacted by Pedro Gonçalves and ticklemycode-commits
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:
Checking if default plugins are disabled (env variable OPENCODE_DISABLE_DEFAULT_PLUGINS)
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:
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.
@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.
Activity
github-actions commentedon Jan 8, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if your specific case differs from these issues.
mcking-07 commentedon Jan 8, 2026
Yes, this interactive login option absolutely exists, and it's integrated into opencode via the
opencode-copilot-authplugin. You should see an authentication option called login with github copilot not just api key.You can try:
/models->ctrl + a(to add a provider) and then configureIf these don't work, try adding the plugin explicitly in your
opencode.json:{ "plugin": ["[email protected]"] }PerGon commentedon Jan 8, 2026
I just had the same issue - after some debugging I found that
opencodewas 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:Note the error with an HTTP 401.
If that's your case, you can temporarily rename the
~/.npmrcjust to see if it starts working.Midwayne commentedon 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.