Open vict0rsch opened 4 years ago
No text.
you are missing the context
field in your config
something like:
[
{
"name": "beluga",
"host": "beluga4.computecanada.ca",
"context": "prod",
"protocol": "sftp",
....
},
{
"name": "mila",
"host": "login-1.server.mila.quebec",
"context": "dev",
"protocol": "sftp",
....
}
]
should work.
If I understand correctly context
is a path ; therefore if I want the same directory synced similarly on 2 remote servers, "context": "."
is the way to go, right?
I noticed, I was using the config the wrong way. Now, I separated all my workspaces and gave them separate configs - all fine for me...
aah... i'm so sorry, i was totally focused on the second part of your question:
Also, name1 is not listed when I hit SFTP: sync local -> remote from the command palette
this can be fixed by setting different contexts (or conticest? :P), like this:
[
{
"name": "my project @ server1",
"host": "server1.net",
"context": "dev",
"protocol": "sftp",
"port": 22,
"username": "ubuntu",
"remotePath": "/home/ubuntu/my-project",
"uploadOnSave": false,
"privateKeyPath": "/Users/f4bio/.ssh/id_ed25519",
"ignore": [
".vscode",
".git",
".DS_Store"
]
},
{
"name": "my project @ server2",
"host": "server2.de",
"context": "prod",
"protocol": "sftp",
"port": 22,
"username": "admin",
"remotePath": "/home/admin/my-project",
"uploadOnSave": false,
"privateKeyPath": "/Users/f4bio/.ssh/id_ed25519",
"ignore": [
".vscode",
".git",
".DS_Store"
]
}
]
which results in:
but you are right, with "uploadOnSave"
set to true
, saved files only get uploaded to the 2nd (or probably the last in this list?) profile.
I'm going to take a look at the source-code later, fingers crossed I find something ;)
It's problem because this not work where you use two or more remote serwer and one context.
This is pointless when every time I change the target server I have to edit the configuration file because the list shows only one target because they have identical context
@f4bio / @MarekLew is this still an issue? Was it ever resolved?
I'm trying to setup a multi-context setup right now. I have each configuration working independently if I remove the other one. But, when I have them both setup, I can not seem to get a file to upload to both or have any way to upload to the one that is not setup to "auto-update".
I have "production" and "dev" as my configuration entries. Dev is setup to uploadOnSave, but I'd like to manually push to production. I can't seem to find any way to upload to production.
Do you read the FAQ?
Files are only uploaded to the second of my two contexts, with config:
Given this config I'd expect both remote dirs to be synced with my local one. However
name1
is not updated if I addname2
(but it is if I remove it). Also,name1
is not listed when I hitSFTP: sync local -> remote
from the command paletteExtension Logs from Startup - required