作者:捕鱼达人2602929461 | 来源:互联网 | 2022-10-28 12:14
我在Gitlab上有一个项目,最近几天我一直在处理它!
现在我想pull
在家用PC上进行项目,但显示以下错误:
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)
我的Android Studio版本是3.4!
1> Adrian Coman..:
设法像这样修复它:
AndroidStudio->首选项-> Git-> SSH可执行文件,从更改Native
为Built-in
,它开始工作。
我为此创建了一个错误:https://issuetracker.google.com/issues/132192012
2> Volodymyr..:
我遇到过同样的问题。通过在命令行中将SSH私钥添加到ssh-agent来解决此问题:
$ ssh-add -K ~/.ssh/id_rsa
另外,检查Git设置是否设置为Native
Settings --> Version Control --> Git
在SSH executable:
下拉菜单中,选择Native
编辑
应该在新的Android Studio 3.4.2中修复
https://issuetracker.google.com/issues/124680708
3> 小智..:
如果您的SSH密钥对已使用密码保护,则似乎会出现此错误
在本地 SSH Executebale不能提示您对Android Studio中据我所知您的密码,所以认证会,如果不另外提供的凭据失败。
使用内置的 SSH可执行文件,您可以通过Android Studio中的提示输入密码。
艾德里安(Adrian)提供的答案非常适合我。