Coder Social home page Coder Social logo

mkloubert / vscode-remote-workspace Goto Github PK

View Code? Open in Web Editor NEW
206.0 17.0 36.0 3.17 MB

Multi protocol support for handling remote files like local ones in Visual Studio Code.

Home Page: https://marketplace.visualstudio.com/items?itemName=mkloubert.vscode-remote-workspace

License: GNU Lesser General Public License v3.0

TypeScript 99.55% JavaScript 0.45%
vscode-extension ftp sftp webdav s3-bucket azure-blob slack dropbox workspaces uri

vscode-remote-workspace's Issues

SFTP Server can't stay connected

Configuration is as follows:
{
"folders": [
{
"uri": "sftp://root:*@.com/myfolder",
"name": "mywork",
"keepAlive":15,
}
],
"settings": {}
}

keepAlive Invalid use, When the editor is not used for 20 minutes, it will be automatically dropped and must be reopened to connect.

PHP validation not working

The following error is shown when opening PHP files from SFTP:

Cannot validate since C://PHP//php.exe is not a valid php executable. Use the setting 'php.validate.executablePath' to configure the PHP executable.

Formatter not working with vscode-remote-workspace

Thanks for this extremely useful extension!

I have vscode-remote-workspace working perfectly with the editor running on macOS and the project files located on a Linux server over sftp. I have the Python extension ms-python.python installed and its variables have been configured to use autopep8 to format the file on save.

Formatting works fine while editing in a local workspace on the Mac.
Formatting on save does not work when saving remote-workspace files - files are saved without running the formatter.
Explicitly trying to format via Option-Shift-F produces a message:
"There is no document formatter for 'python'-files installed."

This is not a problem with formatter installation. If I open a local workspace at the same time, formatting works.

It would be extremely useful for formatting to work with a remote-workspace where the formatter just runs on the local machine and saves to the remote system. Since the edited file is remote, git submission happens from the remote system and having the pushed file be properly formatted is valuable.


Versions:
VS Code: Version 1.23.1 (1.23.1)
ms-python.python: 2018.6.0
mkloubert.vscode-remote-workspace: 0.30.2

Config:
// Controls if the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.
"editor.formatOnPaste": true,
// Format a file on save. A formatter must be available, the file must not be auto-saved, and editor must not be shutting down.
"editor.formatOnSave": true,
// Format on save timeout. Specifies a time limit in milliseconds for formatOnSave-commands. Commands taking longer than the specified timeout will be cancelled.
"editor.formatOnSaveTimeout": 3000,

How to interrupt my remote command?

I used a SFTP mode to load my workspace, I usde F1 to execute remote command, just like "python test.py", and then I can see the results.
But after that, I modified my program, and want to save it, it failed, nothing happened, and the status of that file was still unsaved.
It seems to be stucked, is there any way to shutdown the program or to continue doing something? Now I can execute the command again or execute other commands like 'echo "test"', they all had results shown on the screen, but I just can't save my file.

FTP should support FTPS connection

I think it is super important to have FTP connection support FTPS mode so the connection to the remote server can be encrypted and secure.

I think it is very important to be able to have secure connection to the server in today's world.

show "hidden" files

When connecting to ftp server files starting with "." (.htaccess, .gitignore) do not show up.
Is there a setting I am missing to enable it?

Cannot connect via SFTP with a key file.

No matter what settings I attempt, such as:

{
    "folders": [{
        "uri": "sftp://[email protected]",
        "name": "Name"
    }],
    "settings": {
        "debug": 1,
	"key": "C:\\Users\\username\\Documents\\ssh\\id_rsa",
        "noPhraseFile": 1,
        "phrase": "passphrase"
    }
}

I always get:

TRACE fs.sftp.sftpfilesystem.forconnection() - [19/Jun/2018:05:27:29 +0000] "(Error) All configured authentication methods failed

Stack:
	at vscode_helpers.createLogger (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\out\extension.js:128:64)
	at ActionLogger.<anonymous> (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:244:25)
	at Generator.next (<anonymous>)
	at C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:23:71
	at Promise (<anonymous>)
	at __awaiter (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:19:12)
	at ActionLogger.onLog (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:226:16)
	at ActionLogger.<anonymous> (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:109:95)
	at Generator.next (<anonymous>)
	at C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:23:71
	at Promise (<anonymous>)
	at __awaiter (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:19:12)
	at ActionLogger.log (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:102:16)
	at ActionLogger.logSync (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:123:14)
	at ActionLogger.trace (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\node_modules\vscode-helpers\lib\logging\index.js:146:21)
	at SFTPFileSystem.<anonymous> (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\out\fs\sftp.js:135:22)
	at Generator.throw (<anonymous>)
	at rejected (C:\Users\username\.vscode\extensions\mkloubert.vscode-remote-workspace-0.27.0\out\fs\sftp.js:21:65)
	at <anonymous>"

Cannot Connect to Remote Host | With Errors?

[2018-08-02 19:25:40.678] [renderer1] [error] write EPIPE: Error: write EPIPE
    at exports._errnoException (util.js:1050:11)
    at WriteWrap.afterWrite (net.js:813:14)
[2018-08-02 19:29:16.436] [renderer1] [info] no standard startup: not the explorer viewlet
[2018-08-02 19:34:34.637] [renderer1] [info] no standard startup: not a new window
[2018-08-02 19:34:38.821] [renderer1] [error] connect ECONNREFUSED 162.253.131.98:32683: Error: connect ECONNREFUSED 162.253.131.98:32683
    at Object.exports._errnoException (util.js:1050:11)
    at exports._exceptionWithHostPort (util.js:1073:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)

This is from the Log (Window)

OS: Windows 10 & Mac 10.13.6
VSCode Version: Latest
Extension Version: Latest

The extension will just constantly try to connect. Connects to other hosts, without an issue...and this is the same configuration as FTP/Filezilla in regards to settings.

Do i miss anything ?

Because is not connecting :(
I got a green folder in VSC with !
I test that sftp conn from terminal is working. Not in VSC. So i suppose i do something wrong.

{
"folders": [{
"uri": "sftp://ID:PASS@SERVERIP:PORT/var/www/www.example.com/lsapp/",
"name": "LSAPP R FOLDER "
}]
}

Any help is apreciated.

Remote Workspace Search

This extension is exactly what I was looking for, but it has one major missing functionality issue...

Any file opened from the workspace (or files IN the workspace) are not searched when running a "Find In Files" search.

Is this a problem with the remote filesystem API or the search service?

E.g. If I define a remote workspace on to an Ubuntu machine, using sftp - although I can browse and open files through the workspace GUI -- any attempt to search/find in files fails with "nothing found" (even files open in the editor)

How do I set identity file on config?

Hello I am using amazon aws ec2 as my remote machine

I use private key file .pem to connect my machine.

sftp -o StrictHostKeyChecking=no -i .ssh/myidrsa [email protected]

I used following config

{
    "folders": [{
        "uri": "sftp://[email protected]/",
        "name": "miae"
    }],
    "settings": {key=myidrsa}
}


but it showed

screen shot 2018-06-21 at 12 15 03 pm

Is there any way to pass identity_file to code-workspace?

Git Usage out of remote Workspace

Hi,

this extension is a real helper!

I'm remotely connected to a VM with all code and SCM (git) inside. And here starts the problem. All git commands must be made inside the VM. Unfortunately I cannot use the git functionality from inside VS Code.

Is it possible to make scm and scode-remote-workspace work together?

Thanks!

remote-workspace didn't save file

{ "folders" : [{ "uri" : "sftp://ID:PW@host:22/dir/", "name" : "my server" }], "settings": {} }

is working and i can open my server file.
but can not save.
why....?

Remote Explorer for FTP

Can we connect to the remote server and normaly download the catalogs and files strucure as exist?
The extension GO Outliner creating own icon with menu.
https://marketplace.visualstudio.com/items?itemName=766b.go-outliner

Maybe some ideas from Qucikftp can implemented? I'm the explorer in the dock with new icon? And the manager for the ftp accounts and other workspaces with tree of types, eg. docker, ftp, azure?
microsoft/vscode#20861

I'm realy not sure how this plugin should works with ftp.

files.exclude in .vscode/settings.json is ignored for remote location

Visual studio code allows to configure that some files are not shown in the Explorer view. The patterns are defined in the file .vscode/settings.json as attribute files.exclude.

If you have a workspace file containing an entry for a local path and an entry for a remote path, then these files.exclude settings are only working for the local path but not for the remote path.

Example:
File README.md is located on remote host and local host. Normally they are visible both in Explorer view. If excluding README.md using an entry in files.exclude, then README.md disappears from local folder but stays in remote folder. I would expect that it disappears from both location views.

File .vscode/settings.json:

{
    "files.exclude": {
        "**/README.md": true,
    }
}

File project.code-workspace:

{
    "folders": [
        {
            "uri": "sftp://user@remotehost/home/user/project?debug=1&key=id_rsa&passphrase=&noPhraseFile=1",
            "name": "remote"
        },
        {
            "uri": "file:///home/user/project",
            "name": "local"
        }
    ]
}

Reconnect when connection lost

I'm facing an issue while developing using this extension: for any reason when I loose connection with the server, it won't reconnect automatically, forcing me to reopen the workspace. It would be a great feature to have

Cannot resolve workspace folder

Tried with &legacy=1, not work too. Data I use to login, works for example in Filezilla. So it's not problem with my config I guess.

Basically it shows "Cannot resolve workspace folder"

{
	"folders": [
		{
			"uri": "ftp://xyz:password@host/?debug=1",
			"name": "temp"
		}
	],
	"settings": {}
}

FTP can only access top level files or folders

Examples:

"uri": "ftp://username:[email protected]/public_html/subfolder1/"

  • fails in explorer panel with (Cannot resolve workspace folder)

"uri": "ftp://username:[email protected]/public_html/"

  • shows files and folders in explorer panel, but trying to open index.html fails with (Unable to open...: File not found...) and trying to open subfolder1 fails with (File not found...)

"uri": "ftp://username:[email protected]/"

  • shows files and folders in explorer panel and allows you to open readme.html, or open public_html to see the index.html and subfolder1. But trying open public_html/subfolder1 still fails and trying to open public_html/index.html still fails

Error: New terminal using the remote

Hello,

I added my remote (sftp) to the workspace. It works well.

Now, if I open the integrated terminal and click on "+ new terminal" on the right. I have two option:

  • the directory in local
  • the directory of the remote

new-terminal

If I select the second option, I get this error:

screen shot 2018-08-07 at 11 32 22

Is it possible to add a new terminal automatically connected to the remote with the sftp informations ?

Mode lost after saving the file to the server

The mode is 777 before I save it through VSCode:

-rwxrwxrwx 1 user group 1.9K May 25 14:20 proc.py

After I save it, it's changed to 666:

-rw-rw-rw- 1 user group 1.9K May 25 14:23 proc.py

The executable permission is lost. Can we try to keep it?

searching and code navigation

I was able to view and edit my files using Remote Workspace but was not able to search the workspace for text ("no results found") or use the code navigation feature "go to definition." Are these yet to be implemented or is there likely a problem with my configuration? Thanks for any info.

NB. The project was transferred from a local directory, where these functions were working fine, to a ubuntu AWS server using rsync -a, so the only variable should be the location of the project on a remote server.

Here's the contents from my .code-workspace file:

{
"folders": [{
"uri": "sftp://[email protected]/home/me/project1/?key=/Volumes/ssh-keys/id_rsa",
"name": "project1"
}
],
"settings": {}

linting and formatting

Thank you for the great extension.

Could it possible to implement also linting and code formatting (e.g. for python)? I believe one can have a download on open functionality to achieve, given that there is no possibility to run a remote interpreter...

Can not authenticate with extension

I can connect to my remote with sftp -i ~/.ssh/id_rsa [email protected].

I can also connect using an FTP GUI program (with either my ssh key, or my username and password).

However, with this configuration:

    "folders": [
        {
            "uri": "sftp://[email protected]",
            "name": "My Remote"
        }
    ],
    "settings": {
        "key": "id_rsa",
        "debug": 1
    }
}

I get the error 'All configured authentication methods have failed'.

I've tried an absolute path for key. I have tried putting the username and password in the uri property, with and withouttryKeyboard set to 1, and I get the same error.

Thoughts?

Different chmod file/folders in SFTP

Is it possible to set a different default mode for folders (such as 755) and files (such as 644)?

I didn't find the option.

Also, what's the default for creating new files?

Trouble using literal IPv6 addresses in the URI

I'm trying to connect to an SFTP server using its IPv6 address, however there appears to be an issue with parsing the address.

The following configuration results in the error getaddrinfo ENOTFOUND [fe80 [fe80:22 :

{
    "folders": [{
        "uri": "sftp://user:password@[fe80::a00:27ff:fec3:a0ca]/",
        "name": "Toolchain VM"
    }]
}

The Log (Window) view outputs:

[2018-07-11 13:26:36.587] [renderer1] [info] no standard startup: not a new window
[2018-07-11 13:26:44.977] [renderer1] [info] no standard startup: not a new window
[2018-07-11 13:26:51.302] [renderer1] [error] getaddrinfo ENOTFOUND [fe80 [fe80:22: Error: getaddrinfo ENOTFOUND [fe80 [fe80:22
	at errnoException (dns.js:28:10)
	at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:73:26)

The same URI works fine when entered into WinSCP or used with a command-line SFTP client, but I can't get it to work here as a remote workspace. Is there something else I need to do to make literal IPv6 addresses work?

Introduce additional library for handling FTPS connections

FTPS connections seem to work quite fine, except with both FTP libraries, I have hit following issue on certain servers: icetee/node-ftp#6

I have recently discovered https://github.com/patrickjuchli/basic-ftp which seems to work fine. Would it be possible to either replace the libraries for FTPS with this one, or ditch the node-ftp library and keep the newer one alongside with this one?

I am not quite sure about this since the plugin could then end up quite heavy with having to carry quite a lot of packages along.

Prompt for key phrase

Is there any way to prompt for password rather than saving it in clear text inside the project file? I tried to force tryKeyboard by supplying a wrong password and key, but that has no effect

Local Backup

Great plugin. Thank you. Please post setting to save/ reflect edited changes to local backup.

specific endpoint of s3

I'm trying to mount my Aliyun OSS which provide a Amazon S3 compatible API, just need to specific endpoint and can access with amazon sdk.

but I can't find anywhere to write endpoint in workspace

Multiple folders

Is it me or is it not possible to have multiple folders in workspace?
My workspace settings looks like this and it is working fine when I only have one entry but two is not working.

{
"folders": [
{
"uri": "sftp://username:password@server1:2200/www/",
"name": "server1"
},
{
"uri": "sftp://username:password&Ru@server2:2200/www/",
"name": "server"
}
],
"settings": {}
}

Open multiple files at same time

Is there a setting to allow to open multiple remote files at once? When I have one file open and I click on a second file to open, it closes the first and replaces it with the second. Can it not just open the second file in a new tab? It works if I open it with the "Open to the Side" command, but I don't want it in a side by side mode I want to be able to switch between them.

Please document password limitations.

Following problem with sftp:

I have an user which has a password with special symbols (~!?$/...). When i have setup the uri on code-workspace file, the remote folder became yellow and the ! shows an error like this "could not resolve workspace folder". Then i put ?debug=1 on the end, to see whats going on under the hood. The debug log said "Invalid username" which made no sense the username is right, checked it in WinSCP and Putty. Then i thought a little bit about it, urlencoded the special characters and now it works.

Suggestion: Please document that when you have a password with special characters that you have to "urlencode" these. This would help others not wasting much time figuring out whats wrong, this bugger stole me 45 mins.

BTW: Great job on that extension, i absolutely like it having VS Code not needing any SFTP/SCP client to remote edit files :)

Best regards
T. Schumacher

WebDav Not Using User Credential

The user id and password is in the workspace file but it's not used to make connection.

TRACE fs.webdav.webdavfilesystem.forconnection() - [22/Jul/2018:05:20:16 +0000] "(Error) HTTP error : 401 - Unauthorized

Stack:
at vscode_helpers.createLogger (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/out/extension.js:129:64)
at ActionLogger. (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:244:25)
at Generator.next ()
at /Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:23:71
at Promise ()
at __awaiter (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:19:12)
at ActionLogger.onLog (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:226:16)
at ActionLogger. (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:109:95)
at Generator.next ()
at /Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:23:71
at Promise ()
at __awaiter (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:19:12)
at ActionLogger.log (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:102:16)
at ActionLogger.logSync (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:123:14)
at ActionLogger.trace (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/node_modules/vscode-helpers/lib/logging/index.js:146:21)
at WebDAVFileSystem. (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/out/fs/webdav.js:109:22)
at Generator.throw ()
at rejected (/Users/weikai/.vscode/extensions/mkloubert.vscode-remote-workspace-0.31.0/out/fs/webdav.js:21:65)
at
at process._tickDomainCallback (internal/process/next_tick.js:135:7)"

sftp issues

Great extension! But I am facing some issues while using the sftp protocol:

  1. Symbolic links are not recognized.
  2. We have to put password in the URI? It's showing in the "OPEN EDITORS". "tryKeyboard" seems not working. What about some ssh servers using RSA token as authentication to login?
  3. Can we echo something to the server timely to keep the session alive for longer time?
    Thanks!

Relative path in URI is not handled relative

I want to create a workspace for a Node.js/Typescript project, where source files and transpilation is handled local on my working host, and distributed files are located on remote host.
My .code-workspace file looks for example:

{
    "folders": [ 
        {
            "uri": "sftp://pi@pi18/home/pi/test1/dist?debug=1&mode=664&key=id_rsa_pi18&passphrase=&noPhraseFile=1",
            "name": "pi18/home/pi/test1/dist"
        },
        {
            "uri": "file://src",
            "name" "src"
        }
    ]
}

Works fine, but the URI file://src is handled as absolute path. I would expect that file://src would be handled relative and file:///src would be handled absolute.

Because file://src is handled as absolute path this folder must be located on local host as /src or I have to change the URI to the absolut path on local host, for example file:///home/xyz/projects/pxyz/src. Using absolute paths in project configuration may lead to problems, when you manage such a project with version control software, and other people clone that project to their local machine and having a different absolute path.

I think the best solution would be to handle relative paths relative to the workspace file by default, and to introduce an additional parameter which is used to change it to users home directory or to any other location.

Execute Remote Command dosen't work for training network

I use SFTP to connect my gpu server, it works fine to run a simple code using 'python test.py', but when I run a deep network, it just shows the result "Executing 'python vgg19_bn.py' on sftp://gpu_server/home/sunxk/Documents/DMVCS' ... [Done]", and nothing happened in remote server even a process.

Vscode remote workspace cannot work fun with cpptools.

When I use remote workspace to map a remote c++ project directory to vscode and open a file with .cpp extension,cpptools tried to start for cpp code intellisense but just failed with the following errors:

  • Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Launching server using command ~/.vscode/extensions/ms-vscode.cpptools-0.17.6/bin/Microsoft.VSCode.CPP.Extension.darwin failed.
  • Couldn't start client cpptools:

I'm using vscode on Mac.

Close workspace not working

After closing and reopening Visual Code, remote workspace seems to work correctly by opening files that were not previously opened. Closing and reopening files already open do not end up loading. When this happens, "Close workspace" no longer works from the Visual Code File menu.

Pageant support for SFTP is missing

Hello,

I want to use the remote workspace with an pageant authentication. I don't see any descriptions in the tutorial how I could use them, if the remote workspace already supports pageant.

For this, the password sector should be an optional parameter or better should be prohibted / disallowed.

Many thanks for your support in advance.

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.