1、安装Git Bash
2、桌面上鼠标右键git bash here
3、执行以下命令:
① cd ~/.ssh/ 【如果没有对应的文件夹,则执行 mkdir ./.ssh】
② git config --global user.name “xb12369”
③ git config --global user.email "1234@qq.com"
④ ssh-keygen -t rsa -C "1234@qq.com"
记住,一路回车就行~
4、执行以下命令:
找到C:\Users\xb12369.ssh 目录,里面有两个文件:id_rsa和id_rsa.pub
5、执行以下命令:
配置ssh【这里是id_rsa.pub里面的内容啊】
6、执行以下命令:
说明:
ssh:// username@host
SFTP配置:
{
"protocol": "sftp",
"host": "shdev01",
"port": 22,
"username": "mayouchen",
"privateKeyPath": "~/.ssh/id_rsa",
"remotePath": "/web/dev/app.wmpvp.com/app-mayouchen.wmpvp.com/",
"uploadOnSave": true,
"syncMode": "update",
"ignore": [
"**/.vscode/**",
"**/.git/**",
"**/.DS_Store"
],
"watcher": {
"files": "glob",
"autoUpload": true,
"autoDelete": true
}
}