android srudio 3.6版本使用Git推送源码出现如下错误:
Invocation failed Unexpected Response from Server: Unauthorized
java.lang.RuntimeException: Invocation failed Unexpected Response from Server:
Unauthorized at
org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNativeSs
hAskPassXmlRpcClient.java:34) at
org.jetbrains.git4idea.nativessh.GitNativeSshAskPassApp.main(GitNativeSshAskPassApp.ja
va: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(GitNativeSs
hAskPassXmlRpcClient.java:31) ... 1 more Permission denied, please try again. Invocation
failed Unexpected Response from Server: Unauthorized java.lang.RuntimeException:
Invocation failed Unexpected Response from Server: Unauthorized at
org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNativeSs
hAskPassXmlRpcClient.java:34) at
org.jetbrains.git4idea.nativessh.GitNativeSshAskPassApp.main(GitNativeSshAskPassApp.ja
va: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(GitNativeSs
hAskPassXmlRpcClient.java:31) ... 1 more Permission denied, please try again. Invocation
failed Unexpected Response from Server: Unauthorized java.lang.RuntimeException:
Invocation failed Unexpected Response from Server: Unauthorized at
org.jetbrains.git4idea.nativessh.GitNativeSshAskPassXmlRpcClient.handleInput(GitNativeSs
hAskPassXmlRpcClient.java:34) at
org.jetbrains.git4idea.nativessh.GitNativeSshAskPassApp.main(GitNativeSshAskPassApp.ja
va: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(GitNativeSs
hAskPassXmlRpcClient.java:31) ... 1 more xxx@xxx.xxx.xxx.xxx: Permission denied
(publickey,gssapi-keyex,gssapi-with-mic,password). Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
解决方案:
- In Android Studio go to Help - Find Action - Registry...
- Find git.use.builtin.ssh and enable it
- Check that git works again