VSCode "Writing login information to the keychain failed with error 'UNIX[No such file or directory]'."

Viewed 9020

After solving this and posting to AskDifferent.... I realized this is probably the case with any OS:

in my case I was using MacOS High Sierra 10.13.6 with new install of VSCode 1.50.0 (see screenshots below):

Scenario:

  • Attempt to "Sign-in to Sync Settings"

    enter image description here

  • web/browser-based SSO redirects to Microsoft and/or Github browser login

  • login fails - error message in VSCode:

Error:

Writing login information to the keychain failed with error 'UNIX[No such file or directory]'.

System Details:

  • New install of VSCode For Mac:
    enter image description here

  • And MacOS info:
    ![enter image description here

2 Answers

On my system all I had to do is :

$ sudo apt install gnome-keyring

So I think on MacOs you can also easily solve this issue by installing a keyring system. I don't know MacOs though so I couldn't provide a name.

This is a keychain error which look similar to some others upon Google search, but I didn't find this exact error... so, adding the solution here...

SOLUTION

  1. Attempt to "Sync Settings" by logging into Microsoft or Github
  2. this will fail as OP states... but
  3. close ALL instances/windows of VSCode
  4. RESTART VSCode
  5. You should be prompted for Apple KeyChain permissions like this image shows: enter image description here
  6. Type in your MacOS root password
  7. You will either immediately login without error(s) ... or....
  8. RESTART VSCode AGAIN
  9. "Sync Settings" / login once more
Related