Dynamic SSH Configuration
Our company is trying to switch over to VSCode but a lot of our devs prefer PHPStorm and I'm looking to get this situation fixed. We have moved to remote developer environments and PHPStorm along with our application does not work with the constraints of these remote environments and will constantly crash. This can't change, the thin client and installing PHPStorm isn't an option.
I'm trying to use a combination of using the Deployment config and some dynamic script. Our remote environments IP addresses are always changing and it would be tedious to have to manually change it each time. I'm looking to write a script that will change SSH configs settings in PHPStorm and then also update the Deployment. This way the devs would be able to just click the Deployment name in the bottom of the PHPStorm editor and it will start uploading changed files.
What files should I be modifying in the script to get this working? Is it as simple as modifying the xml files .idea folder? If so what are the specific ones I should modify?
Please sign in to leave a comment.
If your SSH/Deployment records are configured within the project ("Visible for this project" checkbox), then SSH configurations are stored in the ".idea/sshConfigs.xml" file in a human-readable form, like:
So, in theory, your idea should work. At least, I have tried to edit the file on-the-fly and it did the trick.
Vasiliy Yur Well thanks for the speedy reply. I had a chance yesterday to try it out and it didnt work the first time but thanks helping confirm this. The devs will be most pleased to hear we can do this.
Its the same for deployment I assume.