Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(cli): remove defaulting to keyring when --global-config set (cherry-pick) - #20953

Merged
david-fraley merged 1 commit into
release/2.29from
zedkipp/cherry-2.29-keyring
Dec 1, 2025
Merged

fix(cli): remove defaulting to keyring when --global-config set (cherry-pick)#20953
david-fraley merged 1 commit into
release/2.29from
zedkipp/cherry-2.29-keyring

Conversation

@zedkipp

@zedkipp zedkipp commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

This fixes a regression that caused the VS code extension to be unable to authenticate after making keyring usage on by default. This is because the VS code extension assumes the CLI will always use the session token stored on disk, specifically in the directory specified by --global-config.

This fix makes keyring usage enabled when the --global-config directory is not set. This is a bit wonky but necessary to allow the extension to continue working without modification and without backwards compat concerns. In the future we should modify these extensions to either access the credential in the keyring (like Coder Desktop) or some other approach that doesn't rely on the session token being stored on disk.

Tests:
coder login dev.coder.com -> token stored in keyring coder login --global-config=/tmp/ dev.coder.com -> token stored in /tmp/session

(cherry picked from commit bbf7b13)

This fixes a regression that caused the VS code extension to be unable
to authenticate after making keyring usage on by default. This is
because the VS code extension assumes the CLI will always use the
session token stored on disk, specifically in the directory specified by
--global-config.

This fix makes keyring usage enabled when the --global-config directory
is not set. This is a bit wonky but necessary to allow the extension to
continue working without modification and without backwards compat
concerns. In the future we should modify these extensions to either
access the credential in the keyring (like Coder Desktop) or some other
approach that doesn't rely on the session token being stored on disk.

Tests:
`coder login dev.coder.com` -> token stored in keyring
`coder login --global-config=/tmp/ dev.coder.com` -> token stored in
`/tmp/session`

(cherry picked from commit bbf7b13)
@zedkipp zedkipp added the cherry-pick/v2.29 Needs to be cherry-picked to the 2.29 release branch label Nov 26, 2025
@zedkipp
zedkipp marked this pull request as ready for review November 26, 2025 15:10
@zedkipp
zedkipp requested a review from david-fraley November 26, 2025 15:31
@david-fraley
david-fraley merged commit 8430dd6 into release/2.29 Dec 1, 2025
33 checks passed
@david-fraley
david-fraley deleted the zedkipp/cherry-2.29-keyring branch December 1, 2025 20:09
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick/v2.29 Needs to be cherry-picked to the 2.29 release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants