Jayaprakash Mara
Jayaprakash Mara

Reputation: 323

Git operations from Android studio fail

I'm recently hit with a weird issue where my android studio craps out everytime I trigger any git operation (like pull/push). It says:

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... (show balloon)

Any help would be appreciated. Thanks in advance!

Previously, it used to say "RSA host key for IP address 'x.x.x.x' not in list of known hosts'. I deleted known_hosts file and command_line git asked me if it can create one and add this IP, and I said yes.

Command line doesn't have any problem running git operations. It's sourceTree and Android studio who have the problem and I don't know why

Upvotes: 0

Views: 236

Answers (1)

Martin Zeitler
Martin Zeitler

Reputation: 76849

When the remote known_hosts knows the client's IP, the remote host likely cannot be associated locally, or for some other reason, the SSH2 authentication doesn't succeed. Unauthorized generally means, that the firewall isn't the problem.

Try to use the "native" client - which should work, while it works in the terminal:

enter image description here

Upvotes: 1

Related Questions