1. 下载vscode cli文件

2.执行code tunnel

按照terminal提示选择github账户,授权

3.code以用户服务守护运行

code tunnel service install

4.设置服务自启

systemctl --user enable --now code-tunnel
loginctl enable-linger {你的用户名}
vim /home/{你的用户名}/.config/systemd/user/code-tunnel.service

WantedBy=multi-user.target修改为WantedBy=default.target

6. 启用服务

systemctl --user enable --now code-tunnel

7. 重新授权

code tunnel

按照提示重新进行授权,否则显示你未授权,如下:

trace refresh poll failed, retrying: Error getting authorization: authorization_pending The authorization request is still pending.

 查看服务状态

systemctl --user status code-tunnel

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐