Monday, October 31, 2011

GitHub, PhpStorm and SSH-key

If you can't push commit (or active branch) to github from PhpStorm, then check, how your repository was cloned in PhpStorm.
In repository folder find .git folder, there will be file with name "config" (without extension).
Check there [remote "origin"] section, if url starts with https, then you should change it to ssh-link (can be found on your repository's github page, looks like "").

To check, if your SSH-keys is used properly, you can open GitBash and enter following text:
ssh -T

Keys is always pair id_rsa and, you can't change keys in PhpStorm, you can only generate and upload public keys to github from each workplace.


  1. I had problem with env var HOME, i set it to %userprofile% and thought that it would be mine folder, but it was SYSTEM's folder and PhpStorm wasn't able to get keys. It's better to set defined value for HOME env var.

  2. Thank you, this was very helpful to debug the connection!