liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 256 forks source link

uploadOnSave : I can't configure correctly apparently #943

Open JimNayzium opened 3 years ago

JimNayzium commented 3 years ago

I have tried for weeks with different workspaces to get uploadOnSave to function properly. And for whatever reason it works on some workspaces and not on others.

But 100% of the time if I open the sftp.json file in the .vscode folder on that workspace, and before saving a changed file, I "change" the sftp.json file with one simple space-bar and hit save, then return to the open file I want to upload on save, I can then hit a space bar on it (or any other change) and save it, and it immediately uploads. BUT then the very next change or any change on another file doesn't upload.

I spent three hours yesterday trying to configure the .ssh folder properly as my original errors were warnings about no .ssh/config file.

I have read a dozen posts about the .ssh configurations and got all those errors to go away now but the same behavior is present with the changing of the sftp.json file being necessary.

Due to permissions issues with my hosting company, I am not able to add an .ssh folder ABOVE my public_html folder even though I have root access and I have multiple application folders inside my hosting all sitting next to each other. I was logged into terminal with my root user and still couldn't do it, so my .ssh/ folder is in my public_html folder.

Is there something I can do in the sftp.json file that would point directly at that location and that fix this change on save issue? Or is there possibly a different reason that I am stuck in a weird situation where something I am doing each time causes this to happen?

I am fairly sure it's something on my side. It just feels like one of the "user errors" type thing to me!

But I have NO errors now in the output debug -- only file->save and it acts like it should have uploaded.

{ "name":"my_name", "host": "my_remot_ip", (and i've also tried using the short cut host name set up in local .ssh/config to no avail) "remotePath":"/public_html/", "uploadOnSave":true, "downloadOnOpen":false, "ignore":[], "concurrency":4, "protocol":"sftp", "connectTimeout":10000, "interactiveAuth":false, "secure":false, "username": "my_username", "password": "my_password", "port":22, "profiles":{}, (tried with and without this based on posts I read) "privateKeyFile": "~/.ssh/id_rsa.pub" (tried with and without this also) }

Natizyskunk commented 2 years ago

You can try my version, i've fixed a lot of bugs, maybe this will fix yours 🙂 https://github.com/Natizyskunk/vscode-sftp/releaseshttps://github.com/Natizyskunk/vscode-sftp/releases