Intellij 2017.3.3 Ultimate edition Git issue

Answered

Hi

My git works totaly fine with Powershell/cmd/cygwin etc but doesn't work in intellij

Issue Below

git@*************: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

This used to work with older version. 
Steps taken:

1) Installed new git (No effect)

2) Change intellij git settings to use Native instead of Built in (No effect)

3) Created new ssh keys and uploaded to Git profile (No change)

4) Works perfectly fine with command prompt but doesnt work with Intellij

Screenshot of settings


Other settings which I tried (Still no effect)

0
5 comments

Nothing has changed in the git ssh in the recent versions. So if it stopped working, then some config has changed.

Seems your SSH-key is protected with a passphrase, and IDE cannot get the passphrase to decode it.

To use Native mode in case of a passpharse protected key you will have to use ssh-agent. See e.g. https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000114504-Git-SHH-Private-Key-PAssPhrase

With Builtin mode, IDE should be able to as for a passphrase, there could be some other issues though - e.g. it cannot find the key (could happen if it has a non-default name, in this case, the path to it needs to be correctly specified in .ssh/config).

Another reason I can think of is antivirus blocking the prompt (to prompt for a password a specific jar is called by means of a temporary script, so this could happen). Check the logs for the details message.

1

works with Native if I remove passphrase and in built in complains about fatal: ssh variant 'simple' does not support setting port

0

> fatal: ssh variant 'simple' does not support setting port

Set git config ssh.variant ssh, or downgrade git to something lower than 2.16.

https://youtrack.jetbrains.com/v2/issue/IDEA-185221

0

Did git config ssh.variant ssh, and changed to native and I get below error. but still works with Native

com.trilead.ssh2.HTTPProxyException: HTTP Proxy Error (403 Forbidden)
at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:432)
at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:459)
at com.trilead.ssh2.Connection.connect(Connection.java:757)
at com.trilead.ssh2.Connection.connect(Connection.java:686)
at com.trilead.ssh2.Connection.connect(Connection.java:600)
at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:173)
at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:137)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

 

Stil

0

Looks like you have HTTP proxy configured in the IDE. Built-in SSH tries using it.

https://youtrack.jetbrains.com/v2/issue/IDEA-152817

0

Please sign in to leave a comment.