How to fix Invocation failed Unexpected Response from Server: Unauthorized in Android studio

avatar
301    4 months ago

I have one project on Gitlab and I worked with it for the last few days!

Now i want pull project on my home PC but show me below error :

    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)

My android studio version is 3.4 !

Answers { 1 }
avatar
4 months ago

Managed to fix it like this:

AndroidStudio -> Preferences -> Git -> SSH Executable and changed from Native to Built-inand it started working.