Reputation: 49
I'm getting the following error while trying to push or pull or anything with ssh in android studio 3.6
Update failed Invocation failed Unexpected Response from Server: Unauthorized java.lang.RuntimeException: Invocation failed Unexpected Response from Server: Unauthorized at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNativeSshAskPassXmlRpcClient.java:34) at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassApp.main(GitNativeSshAskPassApp.java:30) Caused by: java.io.IOException: Unexpected Response from Server: Unauthorized at org.apache.xmlrpc.LiteXmlRpcTransport.sendRequest(LiteXmlRpcTransport.java:231) at org.apache.xmlrpc.LiteXmlRpcTransport.sendXmlRpc(LiteXmlRpcTransport.java:90) at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178) at org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNat..................
looks like the problem is with native ssh and we cannot change it to built-in like previous versions... how to fix this ???
any help would be appreciated
Upvotes: 2
Views: 1832
Reputation: 49
WORKAROUND:
1. In Android Studio go to Help - Find Action - Registry...
2. Find git.use.builtin.ssh
and enable it
3. Check that git works again
Upvotes: 3
Reputation: 49
I have found an alternative way to make SSH actually work... rate up if it worked for you!!!
using putty plink for ssh instead of the Git ssh(openSSH)
1.set the system env-variable GIT_SSH and let it point to plink.exe download links available here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
2.start pageant and add your private key to it (needs to be converted to another format to be used)(use puttygen to convert id_rsa to ppk)
3.use command in terminal based on github or gitlab : plink -v [email protected] or plink -v [email protected]
congrats now you can work with ssh
Upvotes: -1
Reputation: 31
Not straight solution - but you can change your git url from ssh to https, and it will work.
git remote set-url origin YOUR_REPOSITORY_HTTPS_URL
Upvotes: -1