Giter Site home page Giter Site logo

vscode-sftp's Introduction

sftp sync extension for VS Code

Paypal Donations PayPal Me

Syncs your local directory with a remote server directory. Allows you to optionally edit upload a file to the remote directory after it saves locally. This allows you to edit more or less directly on the server similar to WinScp or other similar programs.

Very powerful, with smart features. Very simple, requires just three lines of config! Very fast, finished in a blink.

Usage

If your latest files are on the server, you can start with an empty local folder, then download your project, and from that point sync.

  1. In VS Code, open a local directory you wish to sync to the remote server (or create an empty directory that you wish to first download the contents of a remote server folder in order to edit locally).
  2. Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac open command palette, run SFTP: config command.
  3. A basic configuration file will appear named sftp.json under the .vscode directory. Edit the parameters to match your setup.

For instance:

{
    "name": "Profile Name",
    "host": "name_of_remote_host",
    "protocol": "ftp",
    "port": 21,
    "secure": true,
    "username": "username",
    "remotePath": "/public_html/project",  <---- This is the path which will be downloaded if you "Download Project"
    "password": "password",  
    "uploadOnSave": true
}

The password parameter is optional but if you don't add it, you will be constantly prompted for a password. Note that you must escape any backslashes and other special characters with a backslash.

There are other Example Configs below.

  1. Save and close the sftp.json file.
  2. Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac open command palette.
  3. Type "sftp" and you'll now see a number of other comands.
  4. A good one to start with if you want to start with a remote folder is SFTP: Download Project. This will download the directory shown in the remotePath setting in sftp.json to your local open directory.
  5. Done - you can now edit locally and after each save it will upload to your remote file.
  6. Enjoy !

For detailed usage. Please go to wiki.

Example Configs

You can see the full config here.

Simple

{
  "host": "host",
  "username": "username",
  "remotePath": "/remote/workspace"
}

Profiles

{
  "username": "username",
  "password": "password",
  "remotePath": "/remote/workspace/a",
  "watcher": {
    "files": "dist/*.{js,css}",
    "autoUpload": false,
    "autoDelete": false
  },
  "profiles": {
    "dev": {
      "host": "dev-host",
      "remotePath": "/dev",
      "uploadOnSave": true
    },
    "prod": {
      "host": "prod-host",
      "remotePath": "/prod"
    }
  },
  "defaultProfile": "dev"
}

Note: context and watcher are only available at root level.

Use SFTP: Set Profile to switch profile.

Multiple Context

The context must not be same.

[
  {
    "name": "server1",
    "context": "project/build",
    "host": "host",
    "username": "username",
    "password": "password",
    "remotePath": "/remote/project/build"
  },
  {
    "name": "server2",
    "context": "project/src",
    "host": "host",
    "username": "username",
    "password": "password",
    "remotePath": "/remote/project/src"
  }
]

Note: name is required in this mode.

Connection Hopping

You can connect to a target server through a proxy with ssh protocol.

Note: Variable substitution is not working in a hop config.

Single Hop

local -> hop -> target

{
  "name": "target",
  "remotePath": "/path/in/target",
  
  // hop
  "host": "hopHost",
  "username": "hopUsername",
  "privateKeyPath": "/Users/localUser/.ssh/id_rsa", // The key file is assumed on the local.

  "hop": {
    // target
    "host": "targetHost",
    "username": "targetUsername",
    "privateKeyPath": "/Users/hopUser/.ssh/id_rsa", // The key file is assumed on the hop.
  }
}

Multiple Hop

local -> hopa -> hopb -> target

{
  "name": "target",
  "remotePath": "/path/in/target",

  // hopa
  "host": "hopAHost",
  "username": "hopAUsername",
  "privateKeyPath": "/Users/hopAUsername/.ssh/id_rsa" // The key file is assumed on the local.

  "hop": [
    // hopb
    {
      "host": "hopBHost",
      "username": "hopBUsername",
      "privateKeyPath": "/Users/hopaUser/.ssh/id_rsa" // The key file is assumed on the hopa.
    },

    // target
    {
      "host": "targetHost",
      "username": "targetUsername",
      "privateKeyPath": "/Users/hopbUser/.ssh/id_rsa", // The key file is assumed on the hopb.
    }
  ]
}

Config in User Setting

You can use remote to tell sftp to get the config from remote-fs.

In User Setting:

"remotefs.remote": {
  "dev": {
    "scheme": "sftp",
    "host": "host",
    "username": "username",
    "rootPath": "/path/to/somewhere"
  },
  "projectX": {
    "scheme": "sftp",
    "host": "host",
    "username": "username",
    "privateKeyPath": "/Users/xx/.ssh/id_rsa",
    "rootPath": "/home/foo/some/projectx"
  }
}

In sftp.json:

{
  "remote": "dev",
  "remotePath": "/home/xx/",
  "uploadOnSave": true,
  "ignore": [".vscode", ".git", ".DS_Store"]
}

Remote Explorer

remote-explorer-preview

Remote Explorer lets you explore files in remote. You can open Remote Explorer by:

  1. Run Command View: Show SFTP.
  2. Click SFTP view in Activity Bar.

You can only view a files content with Remote Explorer. Run command SFTP: Edit in Local to edit it in local.

Note: You need to manually refresh the parent folder after you delete a file to make the explorer updated.

Debug

  1. Open User Settings.

    • On Windows/Linux - File > Preferences > Settings
    • On macOS - Code > Preferences > Settings
  2. Set sftp.debug to true and reload vscode.

  3. View the logs in View > Output > sftp.


Donation

If this project helped you reduce development time, you can give me a cup of coffee :)

Wechat

Wechat

Alipay

Alipay

PayPal

PayPal PayPal Me

vscode-sftp's People

Contributors

aror avatar bezbeli avatar cyrilgandon avatar denis-gorin avatar drderiv avatar ducalex avatar eknkc avatar geekvisit avatar gergokoos avatar linkjay avatar liximomo avatar logerfo avatar multics avatar robertopc avatar unrealkazu avatar wstringer2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-sftp's Issues

[sftp] Handshake failed: no matching client->server cipher

Problem

My configuration file:

{
    "host": "myhost.com",
    "port": 22,
    "username": "myusername",
    "password": null,
    "protocol": "sftp",
    "agent": "null",
    "privateKeyPath": "~/.ssh/id_rsa",
    "passphrase": null,
    "passive": false,
    "interactiveAuth": false,
    "remotePath": "/var/www/laravel/",
    "uploadOnSave": false,
    "syncMode": "update",
    "watcher": {
        "files": false,
        "autoUpload": false,
        "autoDelete": false
    },
    "ignore": [
        "**/.vscode/**",
        "**/.git/**",
        "**/.DS_Store"
    ]
}

I am using privateKey instead of password

I got the error message [sftp] Handshake failed: no matching client->server cipher when trying to upload/download file.

With the same configuration, it works with sftp on SublimeText

Specifications

  • Version: VSC-1.17.1 (1.17.1), sftp-0.8.4
  • Platform: MacOS High Sierra 10.13

Thanks,

QUESTION : SSH behind HTTP proxy possible ?

This is not an issue but just a question. I don't how to ask it. Sorry.

II would like to use your extension behind an HTTP proxy.
Does it possible ?

I don't how if a special conf is necessary in my visual code studio. It access correctly to Internet to download extension.

Best regards

Expected Behavior

[Description of the expected behavior]

Actual Behavior

[Description of the actual behavior]

Steps to Reproduce the Problem

Requisites

Extension Logs

[set option sftp.printDebugLog to true, then reload vscode, reproduce the problem, get the logs(view -> output-> sftp)]

Specifications

  • Version:
  • Platform:

Upload on Save stopped working

Expected Behavior

Upload to SFTP server on file Save

Actual Behavior

This has been working flawlessly until recently but has just stopped uploading on save. I can still right-click on a file and select SFTP:Upload which works fine.

Steps to Reproduce the Problem

  1. Open VSC
  2. VSC shows "SFTP Ready"
  3. Save a file
  4. Does not upload to SFTP server

Requisites (important to diagnose the problem!)

Extension Logs

[info]: config at z:/Projects/host {
"host": "host.example.com",
"port": 22,
"username": "username",
"password": "password",
"protocol": "sftp",
"agent": null,
"privateKeyPath": null,
"passphrase": null,
"passive": false,
"interactiveAuth": false,
"remotePath": "/home/username/code",
"uploadOnSave": true,
"syncMode": "full",
"watcher": {
"files": false,
"autoUpload": false,
"autoDelete": false
},
"ignore": [
"z:/Projects/host//.vscode/",
"z:/Projects/host//pycache/",
"z:/Projects/host//.git/",
"z:/Projects/host//.DS_Store",
"/home/username/code/
/.vscode/",
"/home/username/code/
/pycache/",
"/home/username/code/
/.git/",
"/home/username/code/
/.DS_Store"
],
"configRoot": "z:/Projects/host"
}

Specifications

  • Version: SFTP v0.8.5
  • Platform: Virtual Studio Code v1.17.2 on Windows 10

快捷键绑定

绑定快捷键需要命令行,请问这个插件的命令行是啥,非常感谢!(在输出栏都是debug的内容,能否只显示文件改动的结果,对于debug的输出可以在config中单独设置是否开启)

download mishap

Expected Behavior

download the remote files to a local directory

Actual Behavior

on download, the files are downloaded to the specified directory but also get redownloaded to parent directories and the root folder

Steps to Reproduce the Problem

1.chose command "download" in the open folder in vscode
1.files gets downloaded to all the folders along with the specified folders
1.

Specifications

  • Version:latest
  • Platform: win 10

Renaming will create another file

Expected Behavior

When renaming a file, that file should be renamed on remote server.

Actual Behavior

When renaming a file from foo.js to bar.js, there will be 2 files on the remote server: foo.js and bar.js. I am fine with this behavior. However, when you are require a Node module like require('./foo'), then when you rename from foo to foo.js, things will get messy.

Steps to Reproduce the Problem

  1. Create a foo.js
  2. Upload the file
  3. Rename it to bar.js
  4. There are two files on the remove server.

Specifications

  • Version: 0.7.8
  • Platform: Wins 7.

"connecting..." indefinitely

Expected Behavior

With a config that contains

"privateKeyPath": "/some/path",
"passphrase": null

and a private key that is protected by a passphrase, when I SFTP: Sync To Local, I expect to receive a prompt that allows me to enter my private key's passphrase.

Actual Behavior

"connecting..." is displayed indefinitely in the bottom status bar.

Steps to Reproduce the Problem

1, Create an SSH private key

  1. Create a configuration with the above options
  2. Press F1
  3. SFTP: Sync To Local

Requisites (important to diagnose the problem!)

Extension Logs

[set option sftp.printDebugLog to true, then reload vscode, reproduce the problem, get the logs(view -> output-> sftp)]

[info]: config at redacted {
    "host": "redacted",
    "port": 22,
    "username": "core",
    "password": null,
    "protocol": "sftp",
    "agent": "/tmp/ssh-5D4Vv4lQQE4L/agent.7053",
    "privateKeyPath": "/redacted",
    "passphrase": null,
    "passive": false,
    "interactiveAuth": true,
    "remotePath": "/redacted",
    "uploadOnSave": true,
    "syncMode": "full",
    "watcher": {
        "files": false,
        "autoUpload": false,
        "autoDelete": false
    },
    "ignore": [
        "/redacted/**/.vscode/**",
        "/redacted/**/.vscode/**"
    ],
    "configRoot": "/redacted"
}
[debug]: conncet to remote

Specifications

  • Version: 0.8.5 on VS Code 1.17.2
  • Platform: OpenSUSE Leap 42.3

不能自动同步

我刚刚安装的时候是可以在保存的时候自动同步到远程的,但是第二天就不可以了,只能手动同步,中间也没有安装别的插件也没有修改配置。不知道什么原因。以下是我的配置。机器是虚拟机。以下是我的配置:
{
"host": "192.168.0.246",
"port": 22,
"username": "root",
"password": "centos",
"protocol": "sftp",
"privateKeyPath": null,
"passphrase": null,
"remotePath": "/etc/vsftpd",
"uploadOnSave": true,
"syncMode": "update",
"watcher": {
"files":null,
"autoUpload": true,
"autoDelete": false
},
"ignore": [
"/.vscode",
"
/.git",
"/.DS_Store",
"
/.sftpConfig.json"
]
}

Upload all open files

Just making a feature request here, the same one that I requested on your VSCode plugin page.

Is it possible to have "upload file" and "upload all open files" like the SublimeText version of SFTP when you right-click on an open file tab?

It would be very useful to have this so we can upload a single or a few files that are open fast by clicking on the tabs, instead of finding the files in the file explorer and right clicking on each one of them.

Here is how it looks in SublimeText when you right-click a tab so you get the idea:

ss

Request Option: AskForPassword

Expected Behavior

I would prefer for the password dropdown to come down and ask me for my sftp password

Actual Behavior

I have to input my password in plain text in the config file

How to work at one single file?

I am trying to figure out how the ignore option inside of the json configuration is supposed to be used.

My goal is basically to just upload one single file on save instead of having to issue the upload command manually.

What is the suggested approach to this?

SFTP always searching for config

Since this last version, even though I have the SFTP config for the workspace...

appgames_net

... It still constantly says that it is searching for SFTP config in the status bar.

screen shot 2017-07-05 at 1 48 54 pm

It seems like something is wrong and SFTP is constantly searching for the config file after you moved the config file to the .vscode folder.

I think this needs fixing. Thanks!

How to move config file?

Hi, is it possible to move the .sftpConfig.json file from the root folder of my project into the .vscode folder, which is also in the root of my project?

I tried editing exports.configFileName = '.sftpConfig.json'; on line 22 to exports.configFileName = '.vscode/.sftpConfig.json'; in the config.js but that doesn't work. Help would really be appreciated.

Thanks!!!

Don't create a config file

Expected Behavior

SFTP: config creates sftp.json now

Actual Behavior

SFTP: config, nothing is created in the folder

Steps to Reproduce the Problem

  1. command -> sftp:config
    capture d ecran 2017-09-25 a 12 25 25

  2. after select folder, nothing is created

Requisites

Extension Logs

[set option sftp.printDebugLog to true, then reload vscode, reproduce the problem, get the logs(view -> output-> sftp)]
Ok

Specifications

  • Version: last plugin version
  • Platform: visual code last Version 1.16.1 (1.16.1)

vscode 使用 sftp 问题

作者你好;我在使用这个插件的时候;在目录 .vscode下手动新建了一个sftp.json文件;然后将你的配置选项进行了配置;在保存是就报错了 \api.vscode\sftp.json: Unexpected token / in JSON at position 135

image
然后在编写代码的时候;编辑完成保存然后右键Upload的时候也是报错
api\view\theme\default\template\m\v1\product_info.tpl) config file not found

Interactive authentication

Tryed a one, but doesn't work for me. It will ask for password, but won't ask for verification code, so fails.

And is it possible to hide password with ****?

Config File Not Found When Uploading Files In Tree

SFTP was working (and continues to work in the root folder), but no longer uploads files further down the tree. In the example below, I right-clicked on migrate.sh and clicked on upload. sftp always complains config file not found, even though (as you can see) the config file is present. Furthermore, I can upload files in the root folder without issue - e.g. Dockerfile.

A picture is worth a thousand words:
image

Steps to Reproduce the Problem

I'm not sure how things got into this state, so I don't know how to reproduce. I did add a second, different config further down the tree, but that one seems to work, and deleting the folder has no effect on the above behavior.

Requisites

Extension Logs

[set option sftp.printDebugLog to true, then reload vscode, reproduce the problem, get the logs(view -> output-> sftp)]

[error]: context: undefined reason: Error: (c:\Users\JohnBulcher_gb\Documents\Workspace\Docker-Apps\deals-and-conversations\app\migrate.sh) config file not found
	at runTask (C:\Users\JohnBulcher_gb\.vscode\extensions\liximomo.sftp-0.7.9\out\src\helper\createCommand.js:17:19)
	at Array.forEach (native)
	at runTasks (C:\Users\JohnBulcher_gb\.vscode\extensions\liximomo.sftp-0.7.9\out\src\helper\createCommand.js:20:52)
	at getTarget.then.target (C:\Users\JohnBulcher_gb\.vscode\extensions\liximomo.sftp-0.7.9\out\src\helper\createCommand.js:26:9)
	at <anonymous>

Specifications

  • Version: sftp 0.7.9
  • Platform: Windows 10

Upload works, download doesn't work.

Hi,
This is the only ftp extension that I found to load not only text files, but also Excel, pictures, etc...
However downloading files from server doesn't work reliably :(

Expected Behavior

Download all files when "SFTP Download"

Actual Behavior

Doesn't download. Only uploads

Steps to Reproduce the Problem

  1. tried to change the config file
  2. tried various file types
  3. followed the debug logs
    Upload works ok, download doesn't work.

Requisites

[debug]: download at Thu Aug 24 2017 15:35:24 GMT+0200 (Central Europe Daylight Time)
[debug]:

target: /Scripts/Projects/TVP/Files
context: transmission file
error: Error: Failed to open file.

[debug]: upload at Thu Aug 24 2017 15:35:41 GMT+0200 (Central Europe Daylight Time)

Specifications

[0.7.8]
Win7 x64

[sftp] Permission denied

This is my config

{
"host": "server.hosting.server.com",
"port": 22,
"username": "111",
"password": "222",
"protocol": "sftp",
"agent": null,
"privateKeyPath": null,
"passphrase": null,
"passive": false,
"interactiveAuth": false,
"remotePath": "/www/example.com/wp-content/themes/theme_name/",
"uploadOnSave": false,
"syncMode": "update",
"watcher": {
"files": false,
"autoUpload": false,
"autoDelete": false
},
"ignore": [
"/.vscode/",
"/.git/",
"**/.DS_Store"
]
}

When trying to upload current selected file I got this [sftp] Permission denied
Console output:

[error]: context: undefined reason: Error: Permission denied
at SFTPStream._transform (C:\Users\myusername.vscode\extensions\liximomo.sftp-0.8.3\node_modules\ssh2-streams\lib\sftp.js:405:27)
at SFTPStream.Transform._read (_stream_transform.js:167:10)
at SFTPStream._read (C:\Users\myusername.vscode\extensions\liximomo.sftp-0.8.3\node_modules\ssh2-streams\lib\sftp.js:181:15)
at SFTPStream.Transform._write (_stream_transform.js:155:12)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at SFTPStream.Writable.write (_stream_writable.js:241:11)
at Channel.ondata (_stream_readable.js:557:20)
at emitOne (events.js:96:13)
at Channel.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Channel.Readable.push (_stream_readable.js:136:10)
at SSH2Stream. (C:\Users\myusername.vscode\extensions\liximomo.sftp-0.8.3\node_modules\ssh2\lib\Channel.js:166:15)
at emitOne (events.js:96:13)
at SSH2Stream.emit (events.js:191:7)
at parsePacket (C:\Users\myusername.vscode\extensions\liximomo.sftp-0.8.3\node_modules\ssh2-streams\lib\ssh.js:3439:10)
at SSH2Stream._transform (C:\Users\myusername.vscode\extensions\liximomo.sftp-0.8.3\node_modules\ssh2-streams\lib\ssh.js:667:13)
at SSH2Stream.Transform._read (_stream_transform.js:167:10)
at SSH2Stream._read (C:\Users\myusername.vscode\extensions\liximomo.sftp-0.8.3\node_modules\ssh2-streams\lib\ssh.js:251:15)
at SSH2Stream.Transform._write (_stream_transform.js:155:12)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at SSH2Stream.Writable.write (_stream_writable.js:241:11)
at Socket.ondata (_stream_readable.js:557:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at TCP.onread

How can it be fixed? Thanks.

How to configure proxy?

Hi! How to configure proxy?
Please help me.
Thank you!

{
    "host": "IP",
    "port": 22,
    "username": "username",
    "password": null,
    "protocol": "sftp",
    "agent": null,
    "privateKeyPath": "xxxx/id_rsa",
    "passphrase": null,
    "passive": false,
    "interactiveAuth": false,
    "remotePath": "/web/homes/xxxx",
    "uploadOnSave": false,
    "syncMode": "update",
    "watcher": {
        "files": false,
        "autoUpload": false,
        "autoDelete": false
    },
    "ignore": [
        "**/.vscode/**",
        "**/.git/**",
        "**/.DS_Store"
    ]
}

Control M characters (^M) are getting added, at the line end

Expected Behavior

import os
import sys
import shutil
import glob

Actual Behavior

import os^M
import sys^M
import shutil^M
import glob^M

Steps to Reproduce the Problem

  1. Transfer any file to remote linux machine from windows client (VS code)
  2. After uploading the file , go to remote linux machine and open the file with vi editor
  3. At the end of each line, you can see ^M being added.

Usually this happens SFTP tranferred from windows to Unix. These characters need to be ripped off before uploaded. There is a utility called dos2unix, FYI

Requisites

Extension Logs

[set option sftp.printDebugLog to true, then reload vscode, reproduce the problem, get the logs(view -> output-> sftp)]

Specifications

  • Version: sftp:0.6.7
  • Platform: Windows 10 client, Ubuntu 16.XX remote

FR: autologon

Feature Request:

Command for autologon ssh credentials in integrated console

Stops working with sass live compile

Expected Behavior

Should upload to the remote directory after saving a file while working with live sass compile by ritwick dey at the same time

Actual Behavior

Whenever i use the live sass compile in vscode, the sftp functioning just crashes, it wont upload, it wont sync, nothing happens.
I have to then restart vs code for the sftp to start working again.

Steps to Reproduce the Problem

  1. enable the autowatch feature of live sass compile by ritwick dey
    1.press ctrl+S to save

Specifications

  • Version: latest
  • Platform: w10 pro x64

Prevent the upload of empty (0kb) files

Expected Behavior

add a option for not uploading empty files

Actual Behavior

I cant reproduce it on demand but the plugin often overwrites files on our servers with empty 0 kb files

I work on windows 10

Our config:

{
    "host": "",
    "port": 22,
    "username": "",
    "password": "",
    "protocol": "sftp",
    "agent": null,
    "privateKeyPath": null,
    "passphrase": null,
    "passive": false,
    "interactiveAuth": false,
    "remotePath": "/var/www/online/",
    "uploadOnSave": true,
    "syncMode": "update",
    "watcher": {
        "files": false,
        "autoUpload": false,
        "autoDelete": false
    },
    "ignore": []
}

[sftp] All configured authentication methods failed

Expected Behavior

Trying to upload file to server via sftp

Actual Behavior

Getting error saying all configured authentication methods failed

Steps to Reproduce the Problem

This is my sftp.json file:

{
    "host": "[email protected]",
    "port": 22,
    "username": "example_username",
    "password": "example_password",
    "protocol": "sftp",
    "agent": null,
    "privateKeyPath": null,
    "passphrase": null,
    "passive": false,
    "interactiveAuth": true,
    "remotePath": "/example",
    "uploadOnSave": false,
    "syncMode": "update",
    "watcher": {
        "files": false,
        "autoUpload": false,
        "autoDelete": false
    },
    "ignore": [
        "**/.vscode/**",
        "**/.git/**",
        "**/.DS_Store"
    ]
}

Specifications

  • Version: 0.8.3
  • Platform: Mac OS X El Capitan 10.11.6

希望添加功能

希望添加 删除远程目录和文件,以及重命名远程目录和文件的功能。

SFTP - Authentication via RSA token

Hi,

I am using RSA token authentication for my servers, How can I connect using SFTP plugin with asking password every time instead of configuring directly in config.

Regards,
Santhoshkumar Murugesan.

[sftp] Error: Permission denied

platform

macOS Sierra 10.12.5 (16F73)

version

0.7.3

log

[debug]: config at @workroot

{
  "host": "***",
  "port": 22,
  "username": "***",
  "password": "***",
  "protocol": "sftp",
  "agent": null,
  "privateKeyPath": null,
  "passphrase": null,
  "passive": false,
  "interactiveAuth": false,
  "remotePath": "xxx",
  "uploadOnSave": false,
  "syncMode": "update",
  "watcher": {
    "files": false,
    "autoUpload": false,
    "autoDelete": false
  }
}

[debug]: conncet to remote

upload at Thu Jul 13 2017 22:04:20 GMT+0800 (CST)

------
target: xxx
context: transmission file
error: Error: Permission denied
------

This seems to be the problem after this update

Please support ed25519 key

Expected Behavior

[Description of the expected behavior]
ecDSA is much secure and efficient compare to RSA algorithm and has been support in openssh for long time. Please consider to support the ed25519 format.

Actual Behavior

[Description of the actual behavior]
When I use a private key with ed25519 format, it gives:
[liximomo.sftp] Cannot parse privateKey: Unsupported key format: Error: Cannot parse privateKey: Unsupported key format

Steps to Reproduce the Problem

  1. generate a ssh key with ed25519 format
  2. use private key based sftp sync

Requisites (important to diagnose the problem!)

Extension Logs

[set option sftp.printDebugLog to true, then reload vscode, reproduce the problem, get the logs(view -> output-> sftp)]

Specifications

  • Version: 0.8.4
  • Platform: macOS Sierra 10.12.6

FTPS Support?

Are there plans to support FTPS / TLS/SSL connections?
Thanks

During uploadOnSave, files in "ignored" directories are still uploaded

Issue:

During uploadOnSave, files in "ignored" directories are still uploaded on save. In other words, the 'ignore' setting is not respected for directories during uploadOnSave.

Relevant Settings:

{
    ...
    "uploadOnSave": true,
    "ignore": [
        "**/ignoreme"
    ]
}

Steps to duplicate:

  • Create new directory ignoreme/
  • Create a new file ignoreme/myfile.txt
  • Set uploadOnSave to true
  • Add **/ignoreme to the ignore list.
  • Change ignoreme/myfile.txt and save.
  • Note that ignoreme/myfile.txt is uploaded to the server, even though ignoreme/ is an ignored folder.

What should happen:

  • Files in "ignored" directories should not upload, even during uploadOnSave.

Please fix this. It is very annoying. It causes my local .git/ files to upload to the server.

Can I browse remote directories with the plugin?

With ST3 SFTP plugin I can browse remote directories, actually whole remote server. And select arbitrary files and open them in editor. However I cannot see this functionality in this plugin. Does it exist? How to use it?

Here is all options. Is there something like browse remote?

sftp

Disable File Permission Sync

Expected Behavior

The ability to upload a file without it's permissions

Actual Behavior

Files upload with permission sets. I'm working in a locked down 644-only environment, but keep having to chmod +x shell scripts on the server after upload. It would be useful to include an option to disable this, perhaps "transferFilePermissions": false

Steps to Reproduce the Problem

  1. Download a file with executable permissions (755) from a server via sftp
  2. Change it's permissions to 644, upload it back with sftp
  3. Check the file permissions on the server.
  • Version: .7.7
  • Platform: Windows

Config file not found on windows

Today after upgrade vscode ... i cant upload any file.

Steps to Reproduce the Problem

Config file:
image

Error:
image

my plugin
image

Requisites

windows 10
vscode
image

Can I config the local path?

I hava a porject with webpack. The build result is in "dist" folder.
How can I upload the "dist" folder to remote by this ext ?
thank u.

Exit Code 1

Hi. Please explain what
[sftp] Received exit code 1 while establishing SFTP session
error means?
I put valid credentials for ftp server, but upload fails with this eror.
Can't figure out what is wrong?

Using SSH agent on mac OS

Hey!

I can't figure out how to use the built-in ssh agent on mac OS. For obvious reasons I don't want to enter my ssh password into a clear text file, nor do I want to enter the passphrase for my ssh key into a clear text file. Do you know how I can convince your tool to use the standard mac OS ssh agent so the password stored in the keychain will be used?

config file location

Config file is located right in the project folder. Can it be moved to .vscode folder?

How to create multiple config?

Expected Behavior

When I launch the "SFTP: Config" command and I just have a config file, I expect that it creates a new config file

Actual Behavior

It open the actual config file

Cannot create folder on remote server

Expected Behavior

When I create folder in VSC , and a file in that new folder, when I save the file and upload it, foldershould by created on remote server and file sent.

Actual Behavior

Files can be uploaded only if folders exist on server. When I create folder on local machine, I also have to create it manually on remote. When I try to upload file in newly created folder, it fails with error shown below.
sftpConfig.json is properly configured, downloading and uploading files to existing folders works properly.

Steps to Reproduce the Problem

I have local directory structure like this:

  • igol-source
    |-+ .vscode
    | |- .sftpConfig.json
    |
    |-+ webroot
  1. create new folder in project workspace (for example igol_source/webroot/admin)
  2. create file it this folder (igol_source/webroot/admin/readme.txt)
  3. Try to upload readme.txt (either by sftp:Upload or UploadOnSave)
  4. Get error message like below

Extension Logs

[debug]: upload at Fri Aug 25 2017 19:28:44 GMT+0200 (Środkowoeuropejski czas letni)
[debug]: 
------
target: c:\Users\Paweł\Documents\Igol\igol-source\webroot\admin\readme.txt
context: transmission file
error: Error: /domains/pagal.pl/public_html/igol/webroot/admin/readme.txt: No such file or directory
------
[debug]: remote error {
    "code": 421
}

Specifications

  • Version: sftp 0.7.8, VisualStudioCode 1.15.1
  • Platform: Windows 10

Switchable configs

Hi,
I would love a feature that handle multiple configs.
For example to switch between a dev-server config and a live-server config.
Maybe a posibility to override the "default" settings. like this:

{
    "host": "www.thisisthehost.com",
    "port": 22,
    "username": "username",
    "password": null,
    "protocol": "sftp",
    "uploadOnSave": false,
    "profiles" : {
        "dev" : {
            "remotePath" : "/dev",
            "uploadOnSave": true,
        },
        "live" : {
            "remotePath" : "/live"
        }
    }
}

So it could be switch between dev and live or any other profile in the project and upload files. :)

Files edited externally are uploaded with 'watcher["files"]' set to false, if 'uploadOnSave' is set to true

Issue:

If uploadOnSave is true, then files saved externally will upload, even if watcher["files"] is false.

Relevant Settings:

{
    ...
    "uploadOnSave": true,
    "watcher": {
        "files": false,
        "autoUpload": false,
        "autoDelete": false
    }
}

Steps to duplicate:

  • Create a new file myfile.txt
  • Set uploadOnSave to true
  • Set watcher["files"] to false
  • Change myfile.txt with Notepad (or any external program) and save.
  • Note that myfile.txt is uploaded to the server, even though watcher["files"] is false.

What should happen:

  • When watcher["files"] is false, files changed externally should not upload, even when uploadOnSave is true.

Please fix this. It is very annoying. It causes my local .git/ files to upload to the server.

Sync to Remote not working correctly and some files deleted incorrectly

Expected Behavior

I have a Laravel PHP project which I am syncing to a remote FTP.
I have the structure:
app/config/app.php
app/config/dev/app.php

Right click on app/config/dev Sync to Remote.
Automatic file synchronization should copy changes to Remote.

Actual Behavior

Right click on app/config/dev Sync to Remote the app/config/dev/app.php file is not copied when it doesn't exist on the remote.
If I right click on app/config/dev/app.php and click upload then it does upload.

More concerning I click upload on this file to upload it ok but then after switching branches on my local this file keeps being deleted on the remote by SFTP.

Steps to Reproduce the Problem

Please see Behavior above

Extension Logs

Nothing of use logged.

Specifications

  • Version: 0.8.3, just updated to 0.8.4 and will retest
  • Platform: Windows 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.