Downloading option from remote hosts disabled
Answered
Hello,
I am accessing remote server using Pycharm with SSH and SFTP. Although I am able to upload files and edit files from the remote server, I am not able to download files from the server. The download options from the Tools->Deployment/ are disabled (I am not sure if right clicking on the respective files/folders provide the option to download as I do not see any.)
I am using Pycharm 2021.3.3
Please sign in to leave a comment.
Looks like the upload option is also disabled.
Did you check if the mappings of your deployment config are correct?
Do I need to mention mappings like the deployment path and the web URL if I want just to browse the host, edit its files and upload/download them, i.e. if I just want to use Pycharm as an SSH client? I am not deploying "a server" as such in the remote machines.
Here is what I meant by upload (which works very well as required):
I access the remote host from the Remote Host Tab. For e.g. - there is a folder called folder1 with a file called test.py. I can open the file test.py and edit it in Pycharm. As soon as it edit it, there comes an option to upload it since it has changed w.r.t to the file on the server. I just click the button and the changes are reflected in the file test.py in the server. This is really a great feature.
Regarding download:
Now, if there are some log files in the folder1, and I just want to download them (say right click on the file->download and the file gets downloaded to my local PC), I am not able to do that. Is there a way for this?
I have attached screenshot of deployment config and the mapping for a remote host. I am not sure how they are used in this case.
To download files to your local machine, PyCharm should know from where and where to download them.
Your mappings should both point to a project located in the local path and on the remote host.
Do you store your project under /root/ on the remote host?
Okay, solved it for the time being. The issue was in the mapping. Specifying Deployment path as /folder1/ does the job.
However, if I have, let's say, 20 remote hosts, I have mention this path for each and every host manually. It would be great if that is taken care of automatically and a user just can download files/folders from the remote hosts locally. For. e.g. likethe ssh client MobaXterm. After creating the ssh configuration, a user can browse the contents of the remote machine and upload and download files/folders very easily. It would be great to have such flexibility in pycharm too.
At the same time, opening an SSH connection, opens a terminal with the name of the session as the IP of the remote host. Again, from scalability from of view, it would be helpful to have the name of the session as the name of the SSH config that is saved by the user. I can do that by renaming the terminal of the SSH session, but again when I close the tab, I need to do the process again. Imagine if there are 20 such sessions like this and the process needs to be repeated.
Thanks for your help!