如何修复调用失败来自服务器的意外响应:在 Android studio 中未经授权

新手上路,请多包涵

我在 Gitlab 上有一个项目,最近几天我一直在使用它!

现在我想要 pull 项目在我的家用电脑上,但显示以下错误:

 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

原文由 Jake warton 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 441
2 个回答

设法像这样修复它:

AndroidStudio -> Preferences -> Git -> SSH Executable 并从 Native 更改为 Built-in 并开始工作。

编辑:这是针对 Android Studio 3.4 的,对于 3.6 Volodymyr 在下面有一个答案。

原文由 Adrian Coman 发布,翻译遵循 CC BY-SA 4.0 许可协议

在 Windows 10 上使用 Android Studio 3.6.2 启用凭证助手对我有用

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

原文由 Gpak 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题