Extensions(Ctrl + Shift + X
)からnatizyskunk.sftpを入力し、SFTPをインストール
Ctrl + Shift + P
を推しftpと入力し、SFTP: Configを開く
Configを書いて保存
{
"name": "My Server",
"host": "sv14460.xserver.jp",
"protocol": "ftp",
"port": 21,
"username": "test@xs679698.xsrv.jp",
"password": "your password",
"remotePath": "/xs679698.xsrv.jp/public_html/",
"uploadOnSave": true
}
必須項目
host
protocol
ftp
port
21
https://www.xserver.ne.jp/manual/man_ftp_spec.php
username
password
remotePath
uploadOnSave
true
にすると保存時に自動アップロードされます
ファイルを保存して自動アップロード
FTPS
"secure": true
に設定する
{
"name": "My Server",
"host": "sv14460.xserver.jp",
"protocol": "ftp",
"port": 21,
"secure": true,
"username": "test@xs679698.xsrv.jp",
"password": "your password",
"remotePath": "/xs679698.xsrv.jp/public_html/",
"uploadOnSave": true
}
.vscode/と.git/を除外する
.vscode\sftp.json
にパスワード記載してるなら除外しましょう
{
"name": "My Server",
"host": "sv14460.xserver.jp",
"protocol": "ftp",
"port": 21,
"secure": true,
"username": "test@xs679698.xsrv.jp",
"password": "your password",
"remotePath": "/xs679698.xsrv.jp/public_html/",
"uploadOnSave": true,
"ignore": [
".vscode",
".git"
]
}