phpStorm asking for git password even though command line does not

So I've got phpStorm working well with Git, except when it comes to pulling/pushing to my remote repository. Every time I try it within PhpStorm, it asks for the password of the remote user.
The problem is, there is no password for that account, instead it accepts the SSH keys I have in my %userprofile%/.ssh directory, as described in the PhpStorm documentation.
When using git from Git Bash or just the windows command line, "git push" just works with no further prompts.
Switching to native SSH in the options might work, as it doesn't ask for a password, but I can't be sure because it also causes the entire process to hang, so that no git action actually finishes.

Thoughts?

0
10 comments

Hello Ryan,

Do you have anything in .ssh/config file?

Please attach the output of the Version Control -> Console.

0
Avatar
Permanently deleted user

%userprofile%/.ssh/config does not exist.

Here's the console log:
09:02:29.292: git pull --no-stat -v origin develop --progress
SSH: authentication methods: [publickey, keyboard-interactive, password] last successful method:
java.io.IOException: Authentication failed: Invalid user or password.
at org.jetbrains.git4idea.ssh.SSHMain.authenticate(SSHMain.java:280)
at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:155)
at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:135)
fatal: The remote end hung up unexpectedly

0

It seems that IDEA can't find the SSH keys in the home directory.

Could you please check the following:
1. Do you have HOME environment variable set? What is the value?
2. Where are the SSH keys (id_rsa, id_rsa.pub) stored? Please specify the absolute path (of course, you may strip out your username).
3. Please check idea.vmoptions for -Duser.home variable? Is it set, what is the value?

0
Avatar
Permanently deleted user

1) I don't know how to check exactly what phpStorm is seeing, but when I look in system properties' Environment Variables, it does not list HOME under System Variables.
2) The SSH keys are in  C:\Documents and Settings\<username>\.ssh Both id_rsa and id_rsa.pub are present. %userprofile% points to  C:\Documents and Settings\<username>
3)  c:\program files\jetbrains\phpstorm 2.1.5\bin\PhpStorm.exe.vmoptions does not contain a line begining with -Duser

0
Avatar
Permanently deleted user

Adding a system variable for HOME pointing to C:\Documents and Settings\<username> seems to have fixed it. :)

0

Please confirm: once you've set up the HOME variable to  C:\Documents and Settings\ the problem went away, and IDEA SSH is now working correctly, right?

What Windows version do you use?

0
Avatar
Permanently deleted user

Almost, it had to be with my username: C:\Documents and Settings\<username>
And now PHPStorm is working correctly.
I'm using Windows XP  SP3

0

Setting the HOME variable also worked for me.
[Solved] Issue: "Push failed... fatal: The remote end hung up unexpectedly"
Thank you.
Win7 64bit PHPStorm v3.0.1

0

Thanks - that was a good idea to check Environment Variables
In my case the problem was the missing entry
GIT_SSH
with value like
C:\Program Files\TortoiseGit\bin\TortoisePlink.exe
In startup folder I added the link
"C:\Program Files\TortoiseGit\bin\pageant.exe" "path to putty key.ppk"
In phpStorm config at the GIT section the value of "SSH executable" I selected to "Native"
-------
phpStorm PS-124.373
Windows 8 64bit

0
Avatar
Permanently deleted user

I think, it's a new problem. After upgrading to the actual version,  the git client cannot authenticate, but with the cli it works.

0

Please sign in to leave a comment.