Reputation: 1868
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://[email protected]:1234/path/to/repo.git
[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
puttykeyfile
line in the definition of origin
(no change)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
Upvotes: 1
Views: 3059
Reputation: 3855
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.
Upvotes: 3