Android Studio 3.6 git推送失败

2020-03-05  本文已影响0人  黑山大妖王

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.

解决方案:

  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
上一篇下一篇

猜你喜欢

热点阅读