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?
Since working remotely became a necessity, PyCharm offers the Remote Development functionality to help you code, run, debug, and deploy your projects remotely.
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.
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.
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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With