Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to update keyring with new credentials: error updating keyring (Raspberry Pi 4 remote) #8628

Closed
zytegalaxy opened this issue Jun 21, 2023 · 3 comments
Labels
code-server Issues on the VS Code Server.

Comments

@zytegalaxy
Copy link

Issue description:

I am running Vscode on a remote Raspberry Pi 4 (with 64-bit OS). The CLI (code tunnel) gives me device code and I can successfully authenticate and connect to it remotely. However, the issue is that if the tunnel restarts (device reboot for example), it will generate a new device code since it cannot store the previous device code on the keyring (see warning in the attached log below).

Since this is a remote device and I don't have access to it if remote connection is disrupted, I cannot get the new device code from it and I get locked out.

I would like to know why it cannot store the device code. I was also wondering if there a way to store the device code insecurely or force it to use a specific device code.

  • VSCode Version:
code-cli 1.80.0 (commit 636dbcff557af8aa088ae118b1a094dce6632ce7)
  • Local OS Version:
    Not material to this issue since this is related to CLI side (server). Connection is being established with no issue.

  • Remote OS Version:

> uname -a
Linux ubo-120 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Remote Extension/Connection Type: Containers/WSL/Server
    Raspberry Pi 4
  • Logs:
* Visual Studio Code Server
*
* By using the software, you agree to
* the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
* the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
*
To grant access to the server, please log into https://github.com/login/device and use code XXXX-XXXX
[2023-06-21 15:40:42] warn Failed to update keyring with new credentials: error updating keyring: Couldn't access platform secure storage: SS error: result not returned from SS API

Steps to Reproduce:

  1. Install and run CLI on Raspbian Bullseye 64 bit with pi user. You should see the warning about error updating keyring

Does this issue occur when you try this locally?: Yes

@github-actions github-actions bot added the code-server Issues on the VS Code Server. label Jun 22, 2023
@bamurtaugh
Copy link
Member

Thank you for filing! cc @connor4312 and @TylerLeonhardt

@connor4312
Copy link
Member

connor4312 commented Jun 27, 2023

Seems to duplicate the upstream issue on hwchen/keyring-rs#133

To work around this, you can set the environment variable VSCODE_CLI_USE_FILE_KEYCHAIN=1 (e.g. by running echo "export VSCODE_CLI_USE_FILE_KEYCHAIN=1" >> ~/.bashrc and reconnecting)

@HackerDaGreat57
Copy link

Putting VSCODE_CLI_USE_FILE_KEYCHAIN=1 in a new line in /etc/environment does the trick for me. (putting the env var in a global file ensures that it will be defined regardless of where it's running or who is running it; note that on some systems this may be a massive security hole)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code-server Issues on the VS Code Server.
Projects
None yet
Development

No branches or pull requests

4 participants