6

解决VSCode中Github登录状态无法保存的异常

 1 year ago
source link: https://www.wyr.me/post/725
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

解决VSCode中Github登录状态无法保存的异常 - 轶哥

解决VSCode中Github登录状态无法保存的异常

在MacOS Ventura 13.0 Beta版中,使用VSCode会出现Github登录状态丢失的情况,导致重启/新窗口中需要重复登录Github账号才可以同步UI以及插件等设置。

在VSCode的github authentication插件日志可以看到,每次启动VSCode后,都会从MacOS的钥匙串访问APP中获取登录信息。

[Info  - 03:49:14.381] Reading sessions from keychain...

使用Github登录VSCode,可以看到报错信息:

Setting token failed: Error: Password is required.

说明身份验证信息未能成功保存。

解决方法源自:https://github.com/microsoft/vscode/issues/152964#issuecomment-1166805833

即执行下述命令:

rm -rf "/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/vscode-encrypt"

重新登录即可解决此问题。

从当前issues也可看到,新版的VSCode(Version: 1.70.0-insider)已经解决了该问题,但是尚未明确更新到stable版本的时间。

需要注意的是,设置同步功能需要请求vscode-sync.trafficmanager.net服务器,因此需要确保此域名可以被正常访问。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK