Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote development in Pycharm - without local copies

Tags:

pycharm

I know how to set up the Remote Interpreter in Pycharm and so far remote developing went well.

In some cases though, I cannot hold local copies of the files on the machine I work on for commercial issues.

Is there a way, to develop remotely in Pycharm WITHOUT having local copies of the scripts and other project files?

like image 480
bluesummers Avatar asked Sep 18 '17 20:09

bluesummers


People also ask

Can I use PyCharm remotely?

Since working remotely became a necessity, PyCharm offers the Remote Development functionality to help you code, run, debug, and deploy your projects remotely.

How does remote interpreter work in PyCharm?

The central entry point to remote development with PyCharm is the notion of Remote Interpreters. You can configure PyCharm to use Python interpreter from a remote host and set it as your project interpreter. Then you can configure your run/debug configurations to run, debug or test your applications on the remote host.

Does PyCharm have SSH?

You can launch an SSH Session right from PyCharm. By running commands in a dedicated SSH terminal, you can access data on a remote Web server or the default remote interpreter via an SSH tunnel, mainly upload and download files.

How do I open a remote file in PyCharm?

Open the Remote Host tool window by choosing Tools | Deployment | Browse Remote Host or View | Tool Windows | Remote Host from the main menu. , and in the Deployment dialog that opens configure access to the required server. Double-click the desired file or select Edit Remote File from the context menu.

How do I do remote development using PyCharm?

This is how I do remote development using PyCharm: Go to pycharm -> tools -> Deplyoment and configure your remote destination. If you select Automatic Upload then as soon as you save any file on local machine, it will get uploaded to the remote, thereby giving you an impression of working on the remote.

How to check the license in PyCharm?

The license will be checked when you connect to the launched IDE backend. Product in the license on your local machine should match the remote backend IDE. In this context nothing is changed from the way how the regular local PyCharm is handling the licensing.

How to disable local history in PyCharm?

If you want to disable Local History completely, set the retention period to 0. Local History is stored as binary files under the LocalHistory subdirectory in the PyCharm system directory: You can change the location of the system directory using the idea.system.path property.

How to use JetBrains gateway with PyCharm?

You can use one of the following ways to launch JetBrains Gateway: Use PyCharm and the enabled Remote Development Gateway plugin in it. In this case, when you open the PyCharm welcome screen, the Remote Development option will be available immediately and you can connect to your remote server using SSH.


1 Answers

I just had a similar problem. So far, I found two possibilities to open remote files with PyCharm:

1. Use sshfs to mount remote directory
Like this, the directory will be listed when you browse the files your local computer with PyCharm. That is described e.g. here: https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh
I was not able to try this solution myself because I don't have sshfs installed and no root priviliges.

2. Use the new PyCharm feature
In PyCharm, just go to Tools - Deployment - Browse Remote Host as described here: https://blog.jetbrains.com/pycharm/2015/06/feature-spotlight-editing-remote-files/
and add your server.
Choosing SFTP as connection type and using the already existing private key file for key-pair authentication worked for me.

like image 195
Waterkant Avatar answered Sep 19 '22 11:09

Waterkant