VsCode Remote SSH 默认是不支持 Alpine Linux 的,不过,对 Alpine Linux 进行一些改动,就可以实现,比较方便。
步骤如下:
安装
- 安装 Bash
- 安装需要的包
$ apk del dropbear
$ apk add gcompat libstdc++6 openssh wget git
Alpine 配置
$ nano /etc/ssh/sshd-config
AllowTcpForwarding yes
PermitTunnel yes
git 配置
- VsCode 连接 Alpine Linux
- F1 > “Preferences: Open Remote Settings (JSON) (SSH: )”
- 添加下面的内容:
{
"git.path": "/usr/bin/git",
}