1

I have a git remote repository, keys generated with putty (everything works fine in eclipse with it) and I'm trying to create a new project in phpstorm by git checkout but it says he can't read from git repository. I read that phpstorm is searching for a key named id_rsa (standart value) in the user/.ssh Folder (I only have it in the ssh not .ssh folder, can't create a .ssh folder it says: Give a filename...)

I have a different key-name: xyz.ppk in the /ssh folder and I read that I have to make a ssh config file like this?

Host testadress.com IdentifyFile ~/ssh/xyz.ppk

(or better .ssh here?) I put the file in the user/ssh/ folder simply named config

I'm using a different then the standart ssh port too. So I'm using the repository adress like:

ssh://user@testadress.com:1234/home/foldera/git/projectfolder/

But it says: repository test has failed when I test it and he can't read from it to clone the repository. What am I doing wrong here?

alloisxp
  • 175
  • 3
  • 16

1 Answers1

1

It must be .ssh/id_rsa.pub for PHPStorm.

On linux you can create the an folder via

mkdir .ssh

On windows you can go two ways:

  1. Via commandline (Start -> open cmd , changing in directory ( via cd command and then typing mkdir .ssh))

  2. Via a trick in the explorer. Open your user folder and then create a new folder with the following name .ssh.. The explorer things you want to create a file and removes the last dot so it becomes a folder named .ssh.

In this folder you can put your public key and rename it to `id_rsa.pub

Works fine for me since several PHPStorm versions.

For using another port on your git-repositoy have a look at this SO-question: Using a remote repository with non-standard port

Community
  • 1
  • 1
bish
  • 3,381
  • 9
  • 48
  • 69
  • Thank you! It works now! I'm just wondering: What if I want to use different keys (for maybe different servers with the same windows user?) I read about this ssh config file but it seems that phpstorm is ignoring this? (Or did I put the ssh config file into the wrong directory - was in ~/user/.ssh/ ? – alloisxp Jul 13 '15 at 12:39
  • Puh sorry never tried to use multiple keys. I use the same on all repositories I work with. But I think you can set the used key in each git config file ( inside the .git folder) but I'm not sure about that – bish Jul 13 '15 at 13:12