3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrantのソースをvscodeでremoteする方法

Last updated at Posted at 2018-03-09


OS: MAC High Sierra
vagrant-version: 2.0.2

sshで通信ができていることを確認

こちらを実施して、sshログインできることを確認

sftpのパッケージをインスコ

vscode開いてこちらからインスコ

sftpの設定

シンクしたいフォルダをvscodeで開いておく。

Command + pを押して、>sftp configを設定

./.vscode/sftp.jsonがあることを確認

以下をsftp.jsonに記入

{
    "protocol": "sftp",
    "host": "ホスト名",
    "username": "vagrant",
    "remotePath": "/home/vagrant/workspace/シンクさせたい場所",
    "uploadOnSave": false,
    "privateKeyPath": "vagrant ssh-configでIdentityFileのvalueをここに指定"
}

ちなみに、uploadOnSaveのvalueをtrueにすれば、自動でuploadします。

以上です。

参考文献
sftp
vagrantでssh通信する方法

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?