Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 !

like image 857
Jake warton Avatar asked Apr 21 '19 13:04

Jake warton


2 Answers

Managed to fix it like this:

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

Edit: this is for Android Studio 3.4, for 3.6 Volodymyr has an answer below.

like image 189
Adrian Coman Avatar answered Oct 04 '22 07:10

Adrian Coman


Enabling credentials helper worked for me, using Android Studio 3.6.2 on Windows 10

AndroidStudio -> File -> Settings -> Git -> Use credential helper

like image 24
Gpak Avatar answered Oct 04 '22 08:10

Gpak