Pycharm 中的远程开发 - 无需本地副本 [英] Remote development in Pycharm - without local copies

查看:56
本文介绍了Pycharm 中的远程开发 - 无需本地副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在 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.

有没有办法在 Pycharm 中远程开发脚本和其他项目文件的本地副本?

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

推荐答案

我刚刚遇到了类似的问题.到目前为止,我发现了两种使用 PyCharm 打开远程文件的可能性:

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

1.使用 sshfs 挂载远程目录
这样,当你用PyCharm浏览本地计算机的文件时,目录就会被列出.这被描述为例如此处:https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh
我无法自己尝试这个解决方案,因为我没有安装 sshfs,也没有 root 权限.

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.使用新的 PyCharm 功能
在 PyCharm 中,只需转到 Tools - Deployment - Browse Remote Host,如下所述:https://blog.jetbrains.com/pycharm/2015/06/feature-spotlight-editing-remote-files/
并添加您的服务器.
选择 SFTP 作为连接类型并使用现有的私钥文件进行密钥对身份验证对我有用.

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.

这篇关于Pycharm 中的远程开发 - 无需本地副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆