I have SSH set up to authenticate with Github from both Android Studio (3.0.1 - Build #AI-171.4443003) and IntelliJ (2017.3.4 - Build 173.4548.28) and everything was working fine up until yesterday (February 22, 2018).
All of a sudden today (February 23, 2018) when I tried to push or pull anything to/from Github in either IntelliJ or Android Studio it fails, and I get this message in the "Version Control Console":
16:41:14.159: [onebusaway-android] git -c core.quotepath=false pull --progress --no-stat -v --progress upstream master
java.io.IOException: There was a problem while connecting to github.com:22
at com.trilead.ssh2.Connection.connect(Connection.java:791)
at com.trilead.ssh2.Connection.connect(Connection.java:577)
at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:172)
at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:138)
Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:92)
at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:230)
at com.trilead.ssh2.Connection.connect(Connection.java:743)
... 3 more
Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:413)
at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:754)
at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:469)
at java.lang.Thread.run(Thread.java:745)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
This happened at the same time on two different machines, one with Windows 7 Enterprise and the other with Windows 10.
Why did this suddenly stop working, and how can I fix it?
IntelliJ encountered a problem with the github push, pull
from February 23, 2018
.
The reason is that the weak cryptographic of Built-in SSH
in IntelliJ is no longer supported by github.
[IntelliJ - File - Settings - Version Controll - Git]
You can change 'SSH executable' from 'Build-in' to 'Native'.
Since 'Native' uses git.exe, there is no problem because most of the git clients already have the latest cryptographic applied. If you are using an old git client, please update!
https://git-scm.com/download
ps) IntelliJ, PhpStorm, and Android Studio all have the same problem and can be resolved in the same way.
background) Sean Barbeau's answer.
Solution:
For IntelliJ - Update to IntelliJ 2018.1 or 2017.3.5 (173.4674.1).
For Android Studio - Update to Android Studio 3.1 see this comment on issue tracker.
Background:
Github triggered this on February 23, 2018 by permanently removing support for weak cryptographic standards:
https://github.com/blog/2507-weak-cryptographic-standards-removed
However, IntelliJ and Android Studio still have issues with some SSH handshakes using strong security ciphers:
This underlying issue has been fixed in IntelliJ 2018.1: https://youtrack.jetbrains.com/issue/IDEA-140196#comment=27-2717976
...as well as 2017.3.5 (173.4674.1).
For Android Studio, the fix is available in Studio 3.1 see this comment on issue tracker.
As @Been Kyung Yoon mentions in his answer as a workaround you can change the SSH executable to "Native", but as mentioned in the IntelliJ issue note that:
Switching to Native will work, but if your keys are passphrase-protected, you will need to load them into ssh-agent first
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With