lukasz-wronski / vscode-ftp-sync Goto Github PK
View Code? Open in Web Editor NEWFtp Sync plugin for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items/lukasz-wronski.ftp-sync
Ftp Sync plugin for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items/lukasz-wronski.ftp-sync
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
After some tryes the Review file stopped to work, it is not been generated anymore, even after I close and reopen VSCode.
Reported by @EthraZa
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.
ftp-sync: init
casues following error:
"Running the contributed command:'extension.ftpsyncinit' failed."
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')
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
I have tried to sync my files, but when there was a filename with other then standard iso characters (e.g. "nabídka.png"), the syncing crashed. I had to delete the file and then run it again.
Error:
Ftp-sync: sync error: Error: Could not delete maxwell/maxwell/package.json: No such file or directory
Steps to reproduce:
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!
It would be really helpful if the was support for an SSH agent so the SSH key passphrase is not stored in a file.
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.
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).
Are there any plans to support FTPS (FTP over SSL) connections?
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 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.
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: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.
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."
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?
Suggested by @EthraZa
Are there any plans on support of SFTP/SCP?
Your extension is awesome and I'm already enjoining it.
I just would like to ask for one thing:
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.
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.
If I run i.e. a watch task to compile Typescript, at this time it is not possible to upload or download files. Is that an extension problem?
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. :)
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?
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.
My situation is that I want to remotely edit scripts for data mining and there are many large data files in the remote folder that I don't want to download. So instead of compiling a long ignore list, I hope I could specify that I only want to sync scripts, say *.sh *.py and *.R.
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!
This syntax don't ignore my folder on the mac.
{
"ignore": [ "\\.vscode" ]
}
Hello,
I was downloading ftp remote to local ,it was downloading files but suddenly it shows Timeout Error.Help!
Hi,
I Try to sync larger folder to local, but it would always be crash with no response...
How can I deal with it ?
Thanks.
It would be nice to have the enhancement of uploading a single file.
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"
]
}
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!
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:
Steps to duplicate issue:
A few notes:
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.
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.
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"
]
}
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.
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?
I am trying to download but I get this error. Please help!
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.
Is it possible to delete remote file if it's local copy was deleted?
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:
But when I save the file it uploads it to:
Why is this happening?
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!
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"
]
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.