新版Android Studio 使用git pull push 报错 java.lang.RuntimeException: Invocation failed Unexpected end of file from server

 

2022年2月28日 最新版 版本如下

Android Studio Bumblebee | 2021.1.1 Patch 2
Build #AI-211.7628.21.2111.8193401, built on February 17, 2022
Runtime version: 11.0.11+9-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 5120M
Cores: 24
Registry: external.system.auto.import.disabled=true, ide.instant.shutdown=false, ide.usages.page.size=100000, ide.images.show.chessboard=true
Non-Bundled Plugins: org.intellij.plugins.markdown (211.7142.37)

环境配置好后,使用git pull 代码,在文件夹使用 git 命令 正常,在studio 中使用,报错 push pull 均报错,报错如下

 


16:39:55.811: [android] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false -c core.commentChar= pull --no-stat -v --progress origin spring31
Invocation failed Unexpected end of file from server
java.lang.RuntimeException: Invocation failed Unexpected end of file from server
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 'C:\Users\xxxxxxx\AppData\Local\Google\AndroidStudio2021.1\tmp\intellij-git-askpass-local.sh'
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'http://gitlab.xxxxxx.com': No such file or directory

 

解决办法:

File | Settings | Version Control | Git 
勾选 : Use credential helper

 

 

 重新尝试 git pull  push  OK 了

另:新主机 64G 内存,以前build 10分钟,现在2分 ,生产力工具无疑了 

 

posted @ 2022-02-28 16:49  wang_xiaohao  阅读(2030)  评论(0编辑  收藏  举报