gpt4 book ai didi

Android Studio 从 VCS 获取来自服务器的意外文件结尾

转载 作者:行者123 更新时间:2023-12-04 23:58:37 25 4
gpt4 key购买 nike

我一直在尝试让 android studio 克隆一个 git 存储库,但我收到错误消息:'Invocation failed Unexpected end of file from server'。正如许多教程所述,我已尝试在设置中启用凭据管理器,重新安装 git 并重新安装 Android Studio,但它似乎不起作用。当前运行 Manjaro Linux 21.2.4。和 Android Studio 稳定版 2021.1.1。然而,使用 Android Studio Canary 它按预期工作,提示我的服务器用户名和密码。我也没有在 Windows 机器上收到此错误。这是完整的错误。您认为这是什么原因造成的?

    at org.jetbrains.git4idea.GitAppUtil.sendXmlRequest(GitAppUtil.java:30)
at org.jetbrains.git4idea.http.GitAskPassApp.main(GitAskPassApp.java:58)
Caused by: java.net.SocketException: Unexpected end of file from server
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:866)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:863)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87)
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.GitAppUtil.sendXmlRequest(GitAppUtil.java:27)
... 1 more
error: unable to read askpass response from '/home/user/.cache/Google/AndroidStudio2021.1/tmp/intellij-git-askpass-local.sh'
fatal: could not read Username for 'https://git.url.test': No such device or address```


最佳答案

在 MacOS 中,我修复了内部更改:

Android Studio -> Preferences -> Version control -> Git 
[Use credential helper] to enable (without this didn't allow me to save the git address).
然后在顶部菜单上:
Git -> Git remotes then + 
Add your git https address
现在,就我而言, git pull 失败了,因为它没有跟踪的分支。但是允许我在事件日志中选择一个上游分支 - 这向我显示了一个空分支。然后我选择了master并选中了一个复选框(对不起,我不记得它说了什么)。

关于Android Studio 从 VCS 获取来自服务器的意外文件结尾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71417327/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com