18

Working with Professional edition of PyCharm, I'm trying to configure a server for remote deployment of my project over SFTP with OpenSSH + authentication agent as auth type. I have tried to configure PyCharm in Settings > Build, Execution and Deployment > Add server. However, even though I setup and verify successful configuration by Test SFTP connection button, as soon as I click Apply or OK, the User name becomes blank for some reason. Thereafter, when I try to sync with the remote server, the connection fails.

I've found a possible workaround by changing Host name to user@host form instead, which works, but then I can't use the same server configuration when I try to setup a remote interpreter under Project > Project Interpreter > Add SSH interpreter. (there it shows my host url as ssh://null@host). I'm guessing the null is there because PyCharm is somehow not saving the username. I've tried to edit the .idea/webServers.xml file, but couldn't find appropriate key-value pair to change there for user name to be preserved.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
oczkoisse
  • 1,561
  • 3
  • 17
  • 31
  • Do you have any issues with saving any user/login name or password elsewhere (in the IDE, I mean)? For example: a plain FTP server .. or a Database connection etc. – LazyOne Jun 04 '18 at 19:40
  • 2
    I'm having the same issue. Additionally, saving password for DB connections does not work either. Pycharm 2018.3, Kubuntu 18.04 – davidtgq Jul 04 '18 at 09:10

2 Answers2

21

I solved it by changing the standard way to change credentials in Pycharm.

To do this go to Settings/Preferences | Appearance & Behavior | System Settings | Passwords and choose the KeePass option. That solved the problem for me.

Apparently there are problems storing on native keychain. (I'm on Mint 18.3)

SimonCW
  • 356
  • 3
  • 11
  • 2
    Thank you! For now, I've chosen `Passwords | Do not save, forget passwords after restart` option. This works fine with `Deployment | Auth type | OpenSSH and authentication` in that I was able to save a deployment config successfully. **UPDATE**: Of course, the user name does not persist across restarts of Pycharm. I guess KeePass is the only suitable option. – oczkoisse Aug 22 '18 at 03:42
  • It works like a charm, thank you! I suppose with some new PyCharm update they changed the configuration and set "Do not save, forget after restart" instead of "KeePass" ("keep passwords"). This is a bit annoying. – ady Mar 19 '20 at 15:51
0

What worked for me was first going to the following tab:

Preferences -> Build, Execution, Deployment -> Deployment [Connection Tab]

and then inserting my in the "User name" blank.

Note: your user name appears in the ip address of you ec2. e.g. username@@xxx.amazonaws.com

Batool
  • 957
  • 1
  • 12
  • 20