Take the 2-minute tour ×

I found a lot of threads about how to setup git over ssh with msysgit and putty/plink, but rubymine seems to use its own git and ssh implementation (see error message below).

Currently I have putty, msysgit, TortoiseGit and rubymine installed. My repository has two remotes:

[remote "origin"]
    url = ssh://mygituser@
[remote "origin_putty"]
    url = putty-alias:path/to/repo.git
    puttykeyfile = path/to/my/putty/keyfile.ppk

In putty the connection "putty-alias" is defined with the same user, host and port used in origin and also sets the ssh key again (might not be necessary). Using TortoiseGit to push to origin_putty works fine since it loads the putty ssh key and prompts for my passphrase. However, when I'm trying to use origin from rubymine it prompts for the password of mygituser since there is no keyfile defined.

I already tried the following solutions

  • Setting GIT_SSH to plink, running pageant and loading the key there (no change)
  • using the puttykeyfile line in the definition of origin (no change)
  • using origin_putty from rubymine (does not resolve putty-alias)

The reason I think rubymine uses its own ssh implementation is the error message I get on an unsuccessful authentication: SSH: authentication methods: [publickey, keyboard-interactive, password] last successful method:

java.io.IOException: Authentication failed: 
    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
share|improve this question

1 Answer 1

up vote 2 down vote accepted

You're right: by default RubyMine uses trilead-ssh2 Java library, and is not aware about Putty settings.

You may switch to using the native SSH in the Settings | Version Control | Git | SSH Executable | Native But note, that it doesn't work well with passphrases, so if your private key is passphrase protected, you have to use pageant or similar software.

share|improve this answer

Your Answer


