My git remote origin uses ssh url with port specified. I am getting an error while pushing using IntelliJ.
Push failed: Failed with error: ssh variant 'simple' does not support setting port
I encountered this error after upgrading to latest git 2.16.1
From https://confluence.atlassian.com/bamkb/unable-to-detect-latest-git-changes-ssh-variant-simple-does-not-support-setting-port-943532118.html, it seems like git 2.16 doesn't work with SSH executable bundled with IntelliJ 2017.3.
Git version 2.16.0-rc0 does not work well with OpenSSH version 6.7 or older as stated in this bug report.
Changing IntelliJ configuration to use "SSH Executable -> Native" fixed this issue.
I got it solved with setting
git config --global ssh.variant ssh
No need to change anything in Android Studio 3.1
Applies to:
1) IntelliJ IDEA remove port number from your remote
before: | origin | ssh://[email protected]:24567/ABC/my.project/project|
after: | origin | ssh://[email protected]/ABC/my.project/project|
2) IntelliJ IDEA leave SSH executable as "Build-in"
3) create ssh config file ~/.ssh/config
Host git.mycompany.com
HostName git.mycompany.com
Port 24567
User myusername
more details about config see: https://www.ssh.com/ssh/config/
4) restart IntelliJ IDEA
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