Back to skills
SKILL.md
VSCode 技巧
BSecurityvi sshagent.sh ```bash eval $(ssh-agent -s) > /dev/null ssh-add ~/.ssh/id_ed25519 ``` 会自动设置`SSH_AUTH_SOCK`环境变量 1. 打开命令行工具 2. 运行SSH代理 - windows系统:`start-ssh-agent`并输入私钥密码 - 类Unix系统:`ssh-agent $SHELL` 和 `ssh-add 私钥路径` (路径默认值是~/.ssh/id_ed25519),输入私钥密码(可能暂不能关掉命令行工具才起效,等git操作一次后就可以关掉命令行了) 3. 运行命令`code`来启动VSCode 另外的思路:先启动VSCode,然后在VSCode命令行中运行SSH代理,接着其它操作。 你一般只能在VSCode打开一个项目,如果要打开多个项目就要启动多个VSCode,其实你可以`将多个项目集中到工作区里`方便统一进行管理。
- 3 stars
- 0 votes
- 0 copies
- 3 views
- Added February 8, 2026
Works with
Security analysis
75/100- Accesses sensitive system or user directories
- Reads or references SSH private keys
Pro scans all 6 files and shows the line behind each finding
npx -y skills add wuyumin/VSCode --agent claude-codeAre you the author of VSCode 技巧?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/wuyumin-vscode)# VSCode 技巧
### 如何使用有私钥密码的ssh协议的git?
vi sshagent.sh
```bash
eval $(ssh-agent -s) > /dev/null
ssh-add ~/.ssh/id_ed25519
# 查看所有ssh-add -l
# 删除单个ssh-add -d ~/.ssh/id_ed25519 删除所有ssh-add -D
```
会自动设置`SSH_AUTH_SOCK`环境变量
1. 打开命令行工具
2. 运行SSH代理
- windows系统:`start-ssh-agent`并输入私钥密码
- 类Unix系统:`ssh-agent $SHELL` 和 `ssh-add 私钥路径` (路径默认值是~/.ssh/id_ed25519),输入私钥密码(可能暂不能关掉命令行工具才起效,等git操作一次后就可以关掉命令行了)
3. 运行命令`code`来启动VSCode
另外的思路:先启动VSCode,然后在VSCode命令行中运行SSH代理,接着其它操作。
### 工作区的灵活使用
你一般只能在VSCode打开一个项目,如果要打开多个项目就要启动多个VSCode,其实你可以`将多个项目集中到工作区里`方便统一进行管理。
Files in this skill
- Config.md
- Plugin.md
- Shortcut.md
- Skill.md
- snippets/README.md
- snippets/UserSnippet.code-snippets
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.