新版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分 ,生產力工具無疑了 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM