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

Unable to save Github Credentials on Linux #120392

Closed
classabbyamp opened this issue Apr 2, 2021 · 31 comments
Closed

Unable to save Github Credentials on Linux #120392

classabbyamp opened this issue Apr 2, 2021 · 31 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code

Comments

@classabbyamp
Copy link

classabbyamp commented Apr 2, 2021

  • VS Code Version: 1.54.3
  • OS Version: Arch Linux x64 kernel 5.11.10-arch1-1

Steps to Reproduce:

  1. Click the person icon in the bottom right
  2. Click "Sign in to Settings Sync"
  3. Select "Sign in with GitHub"
  4. Browser opens, does Oauth flow, and returns to VS Code
  5. Error message appears: Writing login information to the keychain failed with error 'Unknown or unsupported transport “disabled” for address “disabled:”'.
    image

Does this issue occur when all extensions are disabled?: Yes

Before this gets closed as a duplicate of other issues:

  • yes, I have libsecret and gnome-keyring installed, as other issues describe
  • yes, I have a keyring and it is set as default
  • other applications are able to use the keyring successfully
@maosid
Copy link

maosid commented Apr 6, 2021

I had the same problem before, in my case i need to add dbus-launch in .xinitrc to run dbus-session

  • ~/.xinitrc
# init keyring
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
# export keyring
export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK

...

exec dbus-launch dwm

@RMacfarlane RMacfarlane added the bug Issue identified by VS Code Team member as probable bug label May 6, 2021
@RMacfarlane RMacfarlane added this to the May 2021 milestone May 6, 2021
RMacfarlane pushed a commit to microsoft/vscode-docs that referenced this issue May 7, 2021
@RMacfarlane
Copy link
Contributor

RMacfarlane commented May 7, 2021

Upstream issue about this atom/node-keytar#132

I've updated the troubleshooting guide to point to the instructions from @maosid. Thanks!

@connor4312 connor4312 added verified Verification succeeded *out-of-scope Posted issue is not in scope of VS Code and removed verified Verification succeeded labels Jun 4, 2021
@meganrogge meganrogge removed this from the May 2021 milestone Jun 7, 2021
@Echika
Copy link

Echika commented Jul 16, 2021

Unable to Authorize Github what do I do?

@SergioRius
Copy link

SergioRius commented Aug 10, 2021

Upstream issue about this atom/node-keytar#132

I've updated the troubleshooting guide to point to the instructions from @maosid. Thanks!

And those who doesn't use a gnome based system, like kubuntu?

@moghaazi
Copy link

moghaazi commented Sep 3, 2021

Upstream issue about this atom/node-keytar#132
I've updated the troubleshooting guide to point to the instructions from @maosid. Thanks!

And those who doesn't use a gnome based system, like kubuntu?

Yup, I use Arch with Sway window manager, and this solution didn't fix the issue, I also tried this solution #92972 didn't fix it either

@bdombro
Copy link

bdombro commented Sep 25, 2021

I am having the same/similar issue on Osx:

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

@innoplusdevs
Copy link

innoplusdevs commented Oct 5, 2021

@maosid what would be the code for KDE?

@nan0tube
Copy link
Contributor

nan0tube commented Oct 16, 2021

Upstream issue about this atom/node-keytar#132
I've updated the troubleshooting guide to point to the instructions from @maosid. Thanks!

And those who doesn't use a gnome based system, like kubuntu?

Yup, I use Arch with Sway window manager, and this solution didn't fix the issue, I also tried this solution #92972 didn't fix it either

I use Gentoo, had the same issue and resolved it by launching sway via dbus-run-session sway. Hope this helps someone.

@kamenminkov
Copy link

kamenminkov commented Oct 22, 2021

For me, the error pops up after attempting to sign in, but signing in works regardless of the error.

Running Pop!_OS 21.04 and GNOME.

@nelsonov
Copy link

nelsonov commented Nov 9, 2021

As a kludge, it's also possible to simply do:

dbus-launch code

The dbus-launch command sets some environment variables for the process that it spawns. If you are spawning a window manager in .xinitrc (ie dbus-launch dwm) then the entire GUI session will have those environment variables set.

If you run just dbus-launch at the cli, then you see the variables it is trying to set, ie:

> dbus-launch
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-sqROfzYKp1,guid=e9e634929ddff76d580cde8c618a3862
DBUS_SESSION_BUS_PID=30017

If you have launched your window manager from dbus-launch in .xinitrc or wherever, then you should be able to see those variables already existing by:

env | grep DBUS_SESSION_BUS

For those familiar with ssh-agent, this is the same concept.

@julianperezpesce
Copy link

julianperezpesce commented Nov 27, 2021

I use Manjaro KDE, I can't fix the annoying problem, any help?

@borma425
Copy link

borma425 commented Dec 5, 2021

@julianperezpesce
I had the same problem with manjaro plasma
The problem was solved by :
Add the following lines to your ~/.xinitrc:


eval $(/usr/bin/gnome-keyring-daemon --start)

export SSH_AUTH_SOCK

mkdir -p "$HOME"/.local/share/keyrings```

`sudo pacman -S gnome-keyring libsecret libgnome-keyring`


install seahorse if dosen't exist .

Now restart vscode - he is work with me

@MahmoudAFarag
Copy link

MahmoudAFarag commented Jan 10, 2022

Anyone on kde still facing the problem, simply install gnome-keyring

I'm on arch so sudo pacman -S gnome-keyring did the job

@itsbek
Copy link

itsbek commented Jan 22, 2022

I'm facing the same problem, but the error message is different and that's why haven't tried any solutions for now...
here it is
any thoughts?

@MoRadwan74
Copy link

MoRadwan74 commented Jan 27, 2022

I'm facing the same problem, but the error message is different and that's why haven't tried any solutions for now... here it is any thoughts?

Me too!

@itsbek
Copy link

itsbek commented Jan 28, 2022

I'm facing the same problem, but the error message is different and that's why haven't tried any solutions for now... here it is any thoughts?

Me too!

for me, surprisingly these steps worked out

@yashank09
Copy link

yashank09 commented Mar 5, 2022

Still facing the initial issue on artix(arch) even after installing gnome-keyring & libsecret and adding the above lines to my .xinitrc.
Any other solutions?

@ntrf
Copy link

ntrf commented Apr 2, 2022

This error should not pop up at all if there is no settings sync configured to begin with. Don't tell me "But we need to check somehow". You should add a boolean into the setting disabling keychain access. If that means no settings sync -- that's fine.

@yashank09
Copy link

yashank09 commented Apr 3, 2022

This error should not pop up at all if there is no settings sync configured to begin with. Don't tell me "But we need to check somehow". You should add a boolean into the setting disabling keychain access. If that means no settings sync -- that's fine.

Wait that literally solves nothing though. I clearly have credentials I would like to save but none of the methods above solve it. I have isolated the issue and it seems dbus is having a hard time to start on boot. If I fix it, ill post something here.

@LeoniePhiline
Copy link

LeoniePhiline commented Apr 5, 2022

How can I use KDE Wallet (kwalletd) instead? Gnome keyring does not integrate well into a KDE workstation.

@YerongLi2
Copy link

YerongLi2 commented Apr 7, 2022

I had the same problem before, in my case i need to add dbus-launch in .xinitrc to run dbus-session

* ~/.xinitrc
# init keyring
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
# export keyring
export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK

...

exec dbus-launch dwm

I am on Debian 11-updates/bookworm version (Antix Linux)
Adding throse lines ~/.xinitrc and reboot my laptop does not help me either.

Also I tested

 eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)

And

 eval $(/usr/bin/gnome-keyring-daemon --start)

Either of them gives error message:

 ** Message: 01:31:07.785: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory

Anyone met similar issues?

@wiltonlazary
Copy link

wiltonlazary commented Apr 8, 2022

Please, stop being opinionated how about Linux and keep vscode things on vscode code space, stop trying to use desktop services because Linux users are very diversified and everything was OK until now.

@LeoniePhiline
Copy link

LeoniePhiline commented Apr 8, 2022

It's an improvement if they do it right and support all popular desktops and protocols.

@yashank09
Copy link

yashank09 commented Apr 8, 2022

I had the same problem before, in my case i need to add dbus-launch in .xinitrc to run dbus-session

* ~/.xinitrc
# init keyring
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
# export keyring
export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK

...

exec dbus-launch dwm

I am on Debian 11-updates/bookworm version (Antix Linux) Adding throse lines ~/.xinitrc and reboot my laptop does not help me either.

Also I tested

 eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)

And

 eval $(/usr/bin/gnome-keyring-daemon --start)

Either of them gives error message:

 ** Message: 01:31:07.785: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory

Anyone met similar issues?

Yep same here on Artix s6 machine. I believe this is a problem with our setups and not VS Code itself, so we shouldnt be hoping for any over the top solution from the team.

@YerongLi
Copy link

YerongLi commented Apr 19, 2022

I had the same problem before, in my case i need to add dbus-launch in .xinitrc to run dbus-session

* ~/.xinitrc
# init keyring
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
# export keyring
export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK

...

exec dbus-launch dwm

I am on Debian 11-updates/bookworm version (Antix Linux) Adding throse lines ~/.xinitrc and reboot my laptop does not help me either.
Also I tested

 eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)

And

 eval $(/usr/bin/gnome-keyring-daemon --start)

Either of them gives error message:

 ** Message: 01:31:07.785: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory

Anyone met similar issues?

Yep same here on Artix s6 machine. I believe this is a problem with our setups and not VS Code itself, so we shouldnt be hoping for any over the top solution from the team.

Yes, I guess the best we can do is try whether we can fix this through discussions. The recent progress I met is I tried to add dbus-launch

dbus-launch /usr/share/code/code --unity-launch

The error message becomes

 Writing login information to the keychain failed with error 'Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached'.

screenshot

Any idea how to fix this ?

@itheghost
Copy link

itheghost commented Apr 22, 2022

I have the same issue on arch with i3, but i installed gnome and i tried it from there and somehow i could log in, both to sync settings and for github copilot.
Then switched back to i3 and it would not work.

@itheghost
Copy link

itheghost commented May 2, 2022

I Think i found a "workaround", i opened VS Code, got the error message and exited. I reopened VS Code and waited for the "Unlock the default keyring" thing, typed in the password and it worked. Or im just delusional and they fixed it.

@FadhilAF
Copy link

FadhilAF commented May 28, 2022

I had the same problem before, in my case i need to add dbus-launch in .xinitrc to run dbus-session

* ~/.xinitrc
# init keyring
eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
# export keyring
export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK

...

exec dbus-launch dwm

I am on Debian 11-updates/bookworm version (Antix Linux) Adding throse lines ~/.xinitrc and reboot my laptop does not help me either.
Also I tested

 eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)

And

 eval $(/usr/bin/gnome-keyring-daemon --start)

Either of them gives error message:

 ** Message: 01:31:07.785: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory

Anyone met similar issues?

Yep same here on Artix s6 machine. I believe this is a problem with our setups and not VS Code itself, so we shouldnt be hoping for any over the top solution from the team.

Yes, I guess the best we can do is try whether we can fix this through discussions. The recent progress I met is I tried to add dbus-launch

dbus-launch /usr/share/code/code --unity-launch

The error message becomes

 Writing login information to the keychain failed with error 'Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached'.

screenshot

Any idea how to fix this ?

I have the same error message as you

@jokeroy2022
Copy link

jokeroy2022 commented May 31, 2022

see https://unix.stackexchange.com/a/295652/332452

source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh

see https://wiki.archlinux.org/title/GNOME/Keyring#xinitrc

eval $(/usr/bin/gnome-keyring-daemon --start)
export SSH_AUTH_SOCK

see NixOS/nixpkgs#14966 (comment)

mkdir -p "$HOME"/.local/share/keyrings

@kuberlog
Copy link

kuberlog commented Jun 27, 2022

I'm getting Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached

Gentoo
awesomwm

I've added the stuff to xinitrc

@KafCoppelia
Copy link

KafCoppelia commented Jul 14, 2022

Any idea about KDE Wallet instead of gnome-keyring?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests