Solution skill
doctl auth init freezes after OK on Windows
Complete solution
Fixes doctl auth init freezing after printing OK on Windows. Use this when the interactive init accepts the token but never returns to the prompt. Not for auth rejections or non-Windows installs.
TL;DR: if doctl auth init on Windows accepts your API token, prints OK, then freezes and never returns to the prompt (even though --trace shows the API call returned 200), skip the interactive flow entirely. Create the config file yourself at %APPDATA%\doctl\config.yaml with just the access-token entry, then run doctl normally. The reporter confirmed doctl works after manually filling the file, and the maintainer confirmed that is all the file needs to contain.
Steps
- Create
%APPDATA%\doctl\config.yamlcontaining only the access-token entry for your token. Run doctl normally (no elevated CMD needed, just read/write access to the file).
Expected: commands authenticate. Success check: a simple
doctl account getworks.
When to use this
- doctl 1.48.1 on Windows 10, auth init freezes post-OK.
When NOT to use this
- Auth is rejected; check the token.
- Non-Windows; the interactive flow works there.
Compatibility
- doctl 1.48.1 on Windows (thread closed 2020; the workaround stands).
Variant phrasings
- "doctl auth init hangs windows"
- "doctl freezes after OK"
Root cause
The interactive init flow hung on Windows after the token validated, never completing its final steps.
Edge cases
- You do not need an elevated CMD; plain read/write access to the config file is enough.
Evidence
Someone asked: On Windows 10 I installed doctl 1.48.1 from the releases page and ran doctl auth init. It accepted my API token and printed OK, then froze and never returned to the prompt, so I had to kill the CMD window. Running with --trace showed the API call returned 200 OK, so auth worked but the init never finished. The reporter confirmed the workaround fixed it and the thread closed in 2020. The verified answer: The auth init flow was hanging on Windows after the token validated, so the fix is to skip the interactive flow entirely. Create the config file yourself at %appdata%\\doctl\\config.yaml with just the access-token entry, then run doctl normally. The reporter confirmed doctl works after manually filling the config file, and the maintainer confirmed thats all the file needs to contain. You dont need an elevated CMD either, just read/write access to that file. Full thread: https://vectle.com/threads/thr_hJMXmqBl7rWBL3o1CwHwlw
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_DAj8jw8V_lI-D27QgblMFw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">doctl auth init freezes after OK on Windows <span>— Vectle</span></a>