Giter Club home page Giter Club logo

vscode-ftp-sync's People

Contributors

cesmi avatar chongkong avatar christopheranderson avatar fieldflux avatar hajekj avatar jsmilovic avatar lukasz-wronski avatar najsurf avatar rgthree avatar rmevans9 avatar rocka avatar sgtpanda avatar sterin avatar valepu 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

vscode-ftp-sync's Issues

FTP Passive Mode settings

He there,

First of all, thanks for providing VSCode with that useful extension!

I got some problems with the ftp connection, which are related to passive mode settings. Would it be possible to add passive mode settings?

Thanks,
suuuunto

First tests with ftp-sync 0.2.0

1- Sync (L2R or R2L) always shows 0 operations. The Review file comes with all the operations with empty arrays.

2- Force download or upload, I believe, are showing the right number of operations, if I just ask to Run, it is not working with the error:

Ftp-sync: sync error: Error: EXDEV: cross-device link not permitted, rename '/tmp/uf58xa20tz9f6r' -> '/PATH/FileName.js'

(My /home is mounted in another partition then my /, so my /tmp is in a cross-device regarding anything on /home)

3- After some tryes the Review file stopped to work, it is not been generated anymore, even after I close and reopen VSCode.

4- Would be possible to when we ask for any operations, the dropdown to choose the directory, to already come inside the folder of the file we are editing?

5- Question: If I need to tell if I want the sync to L2R or R2L is it still a "sync"? I'm asking because I woud assume if I ask for sync, it would detect what needs to go R2L and what needs to go L2R.

6- Upload On Save is still working ok.

7- I like the possibility to Run (N operations), Review, Cancel. This will be easily the best ftp plugin for VSCode.

SFTP PrivateKey Support

Hi @lukasz-wronski,

Do you guys planned to add a privateKey key in ftp-sync.json?

"privateKey":"/here/is/my/key"

something like this would fix this I guess

privateKey: require('fs').readFileSync('/here/is/my/key')

Save on second try

Hi, i found little problem. I set auto-upload on FTP plugin. But it works on every second try. On first it only says Uploading, but never ends. And on second try, it works. Video explain it better: https://youtu.be/22Ecg4QSAe8

Local to remote "Full sync" error

Error:

Ftp-sync: sync error: Error: Could not delete maxwell/maxwell/package.json: No such file or directory

Steps to reproduce:

  1. Ftp-sync: Local to remote
    • Folder: "."
    • Full-sync
  2. Repeat step number 1

For some reason, when doing a "Full-sync" the second time, it tries to delete a file in a subdirectory that doesn't exists. "package.json" is located at "maxwell/package.json", not "maxwell/maxwell/package.json".

Here are my configs:

{
    "remotePath": "./maxwell",
    "host": "192.168.2.7",
    "username": "pi",
    "password": "raspberry",
    "port": 21,
    "uploadOnSave": true,
    "ignore": [
        "/.DS_Store",
        "/.vscode",
        "/node_modules"
    ],
    "passive": false
}

I hope this is helpful!

Cheers!

SSH agent support

It would be really helpful if the was support for an SSH agent so the SSH key passphrase is not stored in a file.

Regex not matched properly

I'm trying to ignore files with certain extensions, in this case: *.o files.
This is my ignore list:

    "ignore": [
        ".*\\.o"
    ]

However, the files still appear in the review page.
I've also tried without escaping the ., however that matches everything with an o in it, since the regex will treat the . as any character.

Am I doing something wrong? From the code, it does look like it's using regex to match file names.

Sync definition

Related to #5 (Topic 5)

The senario:
We both download files 1.js and 2.js from server. Now, you edit file 1.js and upload it to the server, then I edit file 2.js, but I have uploadOnSave:false. Now I need to send it over to the server.

What to think about:
If I think about to Sync-L2R I guess the code will notice my files 1.js and 2.js are different from server, so it may upload both of then an overwrite your work on file 1.js. I did not tested it, but if it is what will happen, I would say it is not a "full-sync", but an "upload what diffs".

What if a full-sync:
In this example, what I would expect from a full-sync, is that it notice that the 1.js diffs from server, but the one on server is newer so it needs to be downloaded, so it would appear in the array of filesToDownload (or something) while the 2.js that diffs too but is newer on local, would show on the array filesToUpload of transaction json.

So:
If it is possible for the plugin to compare files mdate, that would make it possible to change Sync-L2R and Sync-R2L to just one "Sync".
Of course Force Upload and Force Download is good to keep, this guys just FTPing files without checking, what is way faster when you know what needs to be transfered and in what direction (probably most of the time we know).

Connecting time out by 40 GB

I've trouble to synchronize from the remote source by over 40 GB size.
It comes this error message

Ftp-sync: sync error: Error: Unable to make data connection

What's the size limit for the extension?

If the Review file is changed, the Commit will not work

If I ask for Review an action and Commit it without touching the Review file, it will work. But if I change the Review file, like comment out a line so the file does not get deleted or something, it will fail with the followiong error:

Running the contributed command:'extension.ftpsynccommit' failed.

Watch files and sync local<->remote

I'd love to have it so that when files change they will auto be pushed up even if i don't save the file. Most common use case is after a git pull I'd like to not have to manually sync. Instead it sees the files changed and syncs on the server.

uploadOnSave will fail for files on new created folders

uploadOnSave:true will fail for files on folders that still does not exist in remote server with the error:

Ftp-sync: Uploading tst.js failed: Error: Can't open that file: No such file or directory

Using Sync L2R creates the new folder remotely and "fix" everything.

Duplicate folder in folder we upload to

Reported by @kasik96: "Upload on save works perfect, but sometimes, when i do new file in folder and saved it, FTP plugin make new sub-folder on ftp"

How to reproduce: " Just make in VS Code in your project new folder and in folder new JS or CSS file. And wrote something to it and hit save, after it change something and hit save. Now look to FTP on Cyberduck or something. You will see 3 subfolders in new folder."

SFTP?

Are there any plans on support of SFTP/SCP?

Ideas to improve sync process

Your extension is awesome and I'm already enjoining it.
I just would like to ask for one thing:

  • The possibility to manually upload/download/sync a single file.

Here we are two guys working in the same remote server, so we can just use S/FTP instead of Git, but if I sync the hole folder and he is working in a file in the same folder, something can go wrong no?
And let the "upload on save" on is cool, but sometimes scary since VSCode does not have history backups and I save a lot while typing.
Sometimes I just like to force download a single file before start working on it, just to be sure.

Anyways thank you for this cool new extension.

Cant download

When i set to Force or Full download from FTP, it downloads like half, and do this error:
screen shot 2015-12-11 at 08 21 36

Hidden files don't work right

Hi

i found a bug that hidden files (starting with .) aren't handlet the right way. i want to upload my .vscode-folder to the ftp-server also. but if i then try to download it, the dot at the beginning of folders name will be removed, from then everything goes wrong.

it's no big thing, but it's really anoying. i have to rewrite the sync-file every time.

Review temp files hangs there after the fact

When we call to Review pending transfers, a file called sync-summary.json shows up on the editor and on the Working Files.
After we call Commit or close the file (since we don't have the Cancel operation here), the file just hangs there in the Working Files. At any time if we save this file it will be created in the root of the project.

I suggest to delete this file after Commit and to implement a Cancel to delete it before commit as well. Just to get rid with it and keep my Working Files clean. :)

VS Code freezes when attempting to sync remote to local

I have been trying out VS Code for and have been trying to get this extension to work. I am using the following config file:

{
    "remotePath": "./",
    "host": "192.168.47.212",
    "username": "trcx",
    "password": "REDACTED",
    "port": 22,
    "protocol": "sftp",
    "uploadOnSave": false,
    "passive": false,
    "debug": false,
    "privateKeyPath": null,
    "ignore": [
        "\\.vscode"
    ]
}

Once the config is in place I attempt to do a full sync from remote to local, and the scan begins. Once the scan is complete a dialog displays saying there are X number of operations to perform and the editor is immediately completely frozen. My only option is to close the whole editor as no amount of waiting solves the issue. See the below picture. This has happened on two windows 10 computers for me, with both large (6000+ files) and small (~100 files) directories. These are both fresh installs of VS Code and this extension. The only other extension loaded is python. Any ideas?

image

Upload on save don't track ignored files

I have included a "sass" directory inside a "new" directory as ignored directory. Now files inside that directory got uploaded on save (which I clearly doesn't want). On the other side if I create dummy sub directory inside ".vscode" (which is ignored directory by default), saving a file inside dummy directory isn't get uploaded.

ftpsync-error

add localPath to config

Quite a few of my projects have a directory structure like

projectdir/
  ´root/
  someotherstuff like .git, server.js etc

so the actual local docroot is root and not projectdir. There already is a config for remotePath but it would be great to have one for localPath too.

Thanks!

Sync prepare in progress... nothing happens

I set up the sftp settings as shown below, started a Remote to Local Sync... nothing happens.
The message Sync prepare in progress... shows below, but nothing gets synced. It is a very small remote folder with 10 small files. The RSA key does work, since it is the same key I use for all my SSH and other apps.

(Using RSA key , replaced some values for privacy)
Settings

{
    "remotePath": "./path...",
    "host": "ip...",
    "username": "user...",
    "password": "",
    "port": 22,
    "protocol": "sftp",
    "uploadOnSave": true,
    "passive": false,
    "debug": false,
    "privateKeyPath": "/path/to/my/key",
    "ignore": [
        "\\.vscode",
        "\\.git"
    ]
}

image

Got sync prepare in progress

Hi, I'm working with a remote raspberry pi and I have this configuration file over SFTP:

{
    "remotePath": "/home/pi/devel",
    "host": "192.168.1.2",
    "username": "pi",
    "password": "raspberry",
    "port": 22,
    "uploadOnSave": false,
    "ignore": [
        "\\.vscode",
        "\\.git"
    ]
}

How can I overtake this issue? Thanks!

VS Code freezes on permission denied error when syncing root

Okay, I've been struggling with an intermittent issue, and I've found how to duplicate it exactly. This has taken me a significant amount of time to work out, so I hope it helps you.

Issue: ftp-sync locks up VS Code while attempting to sync to remote server.

Through troubleshooting, I've determined it requires the following:

  1. A large number of files in local directory. They can even be located in "ignored" folders, such as .git
  2. A folder which does not have read permissions on the remote directory
  3. Two or more empty folders on the remote that are not in the same directory as the permission-denied folder above. They can be anywhere else.

Steps to duplicate issue:

  • Create a new folder on PC. Named here vsftpsync/ for example
  • In git bash clone a big git repo, I used https://github.com/twbs/bootstrap.git
  • We are going to generate a lot of git objects.
  • Start by Deleting the new .git folder. This is faster via Windows explorer than git bash.
  • In git bash, run "git init"
  • then "git add -A"
  • then "cp -r .git/objects ./"
  • then "git add -A" again, and you will have a lot of git objects.
  • In VS Code, sync to remote (into a new vsftpsync/ folder). It will work fine.
  • Now, go to your target server via SSH, and cd into the target directory.
  • run "mkdir testdir"
  • then "mkdir testdir/notauthed"
  • then "chmod goa-r testdir/notauthed" to remove read permissions from that subfolder
  • If you test FTP-Sync again here, you'll see it (kinda) works as expected, throwing a permission denied error. No problem, but I would rather it skip this folder.
  • now run "mkdir empty1" to make an empty directory
  • now run "mkdir empty2" to make another empty directory
  • Sometimes the bug will happen with just one empty directory, but it seems the more empty directories, the worse it gets.
  • Finally, try to sync FTP-Sync again. Here it fails and VS Code freezes requiring it to be terminated via Task Manager.

A few notes:

  • It seems to be the more empty directories, the fewer files are required to trigger the bug. I suspect it's an issue with an async call.
  • For some ungodly reason, FTP-Sync will traverse through the "ignored" directories, even though it does not sync them. Had this not been the case, I would not have had enough files to trigger the bug.
  • On a similar note, FTP-sync should also not traverse "ignored" directories on the remote. There's no need.
  • Also when using "safe-sync," FTP-Sync should not be traversing unmatched remote directories. There's no need. Had this been the case, the permission denied error I had wouldn't have triggered because I did not have the matching local directory.
  • It seems that when FTP-Sync hits a permission-denied error, it just gives up, but I would think it should continue to sync the remaining folders.

is there a way to except some files on download remote to local?

hi, i am using this extension well, and i have one question.
i want to download files from server except some files(like node_modules) so i added "ignore" options in ftp-sync.json file, but it didn't work. looks like "ignore" option is for exclude uploading files on sync. i couldn't found any information about them. is there a way to except some files on download? if no, i hope that you make this and this will very handy for other people who use your plugin.

ftp-sync on mac - not closing connection

When syncing directory or "on save", ftp connection appears doubled on server side (using goDaddy cPanel) and they immediately switch to idle.

Every new ftp servers seems to be doing the same. I end up with several connections open until I get denied (421) new connections.

Sync R2L does not delete folder

Using 0.2.6 on Windows (same behavior in 0.2.5), a folder on a separate drive will not delete when running FTP-Sync: Commit using sample Review file below.

It does delete the files within the folder. No error has been thrown, and it will be 'stuck' on that particular task.

{
    "_readMe": "Review list of sync operations, then use Ftp-sync: Commit command to accept changes",
    "filesToUpdate": [],
    "filesToAdd": [],
    "dirsToAdd": [],
    "filesToRemove": [
        "Wallpapers/4WrlaRZ.jpg",
        "Wallpapers/Twitterc0bb1b9.jpg",
        "Wallpapers/Windows_Insider_Desktop_E-1920x1080-HD.jpg"
    ],
    "dirsToRemove": [
        "Wallpapers"
    ]
}

Sync L2R does not work when it is a new folder

At least on ftp-sync 0.1.4:

1- Create a new folder, add a new file to it
2- Call Sync L2R (same happens with uploadOnSave)
3- [Error] Ftp-sync: Uploading tst.js failed: Error: 553 Can't open that file: No such file or directory

Can't test on ftp-sync 0.2.0 since it does not work at all for me.

No uploading file

For some files it shows

...
Ftp-sync: Uploading profiler.php failed: Error: Can't open that file: No such file or directory
...

But it uploads correctly other files in the same folder.

Any idea?

How to connect to my school server over SFTP?

So I've used Notepad++ and it's ftp plugin for the past few years but I really like Code and want to use it permanently. I've never learned how to generate private keys, so I was hoping someone could point me to the right direction to easily use ftp-sync to my school's servers (Linux).

With Npp's ftp plugin, I just put in my credentials and the program will ask me to authenticate the host key upon first connection.

I know I need to specify a privateKeyPath in the config file but not really sure how to do that since Npp did all the sftp authentication for me.

Could someone guide me in the right direction? Right now, I just edit everything in Code and use Npp to upload it. Thanks.

not uploading (on save) to correct folder

Maybe I'm doing something wrong, I don't know... I just created a folder and inside that folder I placed the configuration and the folders of each website (main domain, subdomain and framework folders). But when I save a file it auto uploads it creating the full path inside the folder where the file is.

For example, the path to a file is:

  • ./static.website.com/js/scripts.js

But when I save the file it uploads it to:

  • ./static.website.com/js/static.website.com/js/scripts.js

Why is this happening?

Error: read ECONNRESET

I tried to work with Ovh server (ftp.cluster012.ovh.net). Authorization succeeded but finally (after about 10 seconds) an error appeared:
"Ftp-sync: sync error: Error: read ECONNRESET".

Passive mode was required but "passive": true didn't help.

I spent an hour on modifying settings but no result. Connection to other hosting provider works fine.

I'd appreciate your help!

Stuck at FTP-Sync: Collecting local files list

Hi,
I have a very large folder, I am trying sync these contents with the remote folder. But, it always stuck at "Ftp-sync: Collecting local files list"
My configuration is given below

System: Windows 7

"remotePath": "/remote/path/to/folder",
"host": "remotehost",
"username": "username",
"port": 22,
"protocol": "sftp",
"uploadOnSave": true,
"passive": false,
"debug": false,
"privateKeyPath": "C:/Users//keypath/keyfilename",
"ignore": [
".vscode",
".git"
]

Error: EXDEV: cross-device link not permitted on mounted drive

Force download or upload, I believe, are showing the right number of operations, if I just ask to Run, it is not working with the error:

Ftp-sync: sync error: Error: EXDEV: cross-device link not permitted, rename '/tmp/uf58xa20tz9f6r' -> '/PATH/FileName.js'

(My /home is mounted in another partition then my /, so my /tmp is in a cross-device regarding anything on /home)

Reported by @EthraZa

Auto sync from remote to local

Hi,

First, thanks for the extension, it's clearly filling a void in VSCode's features, however I have a weird setup that I did not choose or can change:

My files are all on a remote SFTP server, I can download them, edit them and auto save them just fine with the extension, however if a file is changed on the server (git pull, for example), I'm still going to see the old version locally and potentially erase the new version when I modify it again.

Is there anyway to have on the fly sync ? Whenever I open a file, load its state from the server or something ? For now I have to use my old Komodo IDE because it handles remote editing like I just described.

Thanks.

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.