Skip to content

Github Copilot interactive login #7299

Closed

Description

@Midwayne

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?

Activity

  1. github-actions commented on Jan 8, 2026

    @github-actions
    Contributor

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

    • Github Enterprise authorization #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.

  2. mcking-07 commented on Jan 8, 2026

    @mcking-07

    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": ["[email protected]"]
    }
  3. PerGon commented on Jan 8, 2026

    @PerGon

    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.

  4. Midwayne commented on Jan 9, 2026

    @Midwayne
    Author

    @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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions