Skip to content

CLI hangs upon running auth login #1611

Closed

Description

@cedws

I've freshly installed OpenCode and now want to configure a provider.
I'm running opencode auth login but nothing happens - it prints out one line then hangs forever.

cedwards@mars ~ [SIGINT]> opencode auth login

┌  Add credential

Activity

  1. cedws commented on Aug 5, 2025

    @cedws
    Author

    Ran with --print-logs but nothing useful is printed. Ran with --log-level debug before realising it has to be DEBUG but that doesn't print anything either.

  2. thdxr commented on Aug 5, 2025

    @thdxr
    Member

    print logs prints nothing? can i see it

  3. self-assigned this
    on Aug 5, 2025
  4. cedws commented on Aug 5, 2025

    @cedws
    Author
    cedwards@mars ~ [1]> opencode auth login --print-logs --log-level DEBUG
    INFO  2025-08-05T02:57:12 +49ms service=default version=0.3.128 args=["auth","login","--print-logs","--log-level","DEBUG"] opencode
    
    ┌  Add credential
    INFO  2025-08-05T02:57:12 +0ms service=models.dev file={} refreshing
    
  5. Aditya-PS-05 commented on Aug 5, 2025

    @Aditya-PS-05

    @thdxr , can you assign me this issue?

  6. geophpherie commented on Aug 7, 2025

    @geophpherie

    Just installed for the first time today and thought I was seeing the same thing but if I waited long enough (75 seconds) something eventually appeared. Something slow with models.dev?

    ~ () ✘ opencode auth login --print-logs --log-level DEBUG
    INFO  2025-08-07T20:08:51 +58ms service=default version=0.3.133 args=["auth","login","--print-logs","--log-level","DEBUG"] opencode
    
    ┌  Add credential
    INFO  2025-08-07T20:08:51 +1ms service=models.dev file={} refreshing
    ERROR 2025-08-07T20:10:06 +75034ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev
    INFO  2025-08-07T20:10:06 +4ms service=models.dev file={} refreshing
    │
    ◆  Select provider
    
    │  Search: _
    │  ● Anthropic (recommended)
    │  ○ GitHub Copilot
    │  ○ OpenAI
    │  ○ Google
    │  ○ OpenRouter
    │  ○ Vercel AI Gateway
    │  ○ Alibaba
    │  ...
    │  ↑/↓ to select • Enter: confirm • Type: to search
    └
  7. zsmatrix62 commented on Aug 15, 2025

    @zsmatrix62

    same problem here:

    ~/.cache> opencode auth login --print-logs
    INFO 2025-08-15T02:28:43 +46ms service=default version=0.5.1 args=["auth","login","--print-logs"] opencode
    INFO 2025-08-15T02:28:43 +1ms service=app cwd=/Users/kylehuang/.cache creating
    INFO 2025-08-15T02:28:43 +0ms service=app git

    ┌ Add credential
    INFO 2025-08-15T02:28:43 +3ms service=models.dev file={} refreshing
    ERROR 2025-08-15T02:28:49 +6009ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev
    INFO 2025-08-15T02:28:49 +4ms service=models.dev file={} refreshing
    │
    ◇ Select provider
    │ ModelScope
    INFO 2025-08-15T02:28:52 +3384ms service=app name=plugin registering service
    INFO 2025-08-15T02:28:52 +0ms service=app name=config registering service
    INFO 2025-08-15T02:28:52 +2ms service=config path=/Users/kylehuang/.config/opencode/config.json loading
    INFO 2025-08-15T02:28:52 +1ms service=config path=/Users/kylehuang/.config/opencode/opencode.json loading
    INFO 2025-08-15T02:28:52 +0ms service=config path=/Users/kylehuang/.config/opencode/opencode.jsonc loading
    INFO 2025-08-15T02:28:52 +1ms service=config path=/users/kylehuang/.config/opencode/opencode.jsonc loading
    INFO 2025-08-15T02:28:52 +2ms service=config agent={} mode={} plugin=[] username=kylehuang loaded
    INFO 2025-08-15T02:28:52 +0ms service=plugin path=opencode-copilot-auth loading plugin
    INFO 2025-08-15T02:28:52 +1ms service=bun pkg=opencode-copilot-auth version=latest installing package using Bun's default registry resolution
    INFO 2025-08-15T02:28:52 +0ms service=bun cmd=["/Users/kylehuang/.opencode/bin/opencode","add","--force","--exact","--cwd","/Users/kylehuang/.cache/opencode","opencode-copilot-auth@latest"] cwd=/Users/kylehuang/.cache/opencode running
    ERROR 2025-08-15T02:28:55 +2620ms service=models.dev error={"code":"ConnectionRefused","path":"https://models.dev/api.json","errno":0} Failed to fetch models.dev
    INFO 2025-08-15T02:29:29 +33500ms service=bun code=1 stdout=bun add v1.2.19 (aad3abea)
    stderr=Resolving dependencies
    Resolved, downloaded and extracted [6]
    error: ConnectionRefused downloading package manifest opencode-copilot-auth
    done
    ERROR 2025-08-15T02:29:29 +13ms service=default pkg=opencode-copilot-auth version=latest name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 fatal
    Error: Unexpected error, check log file at for more details

  8. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

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