Android Studio git push 报错fatal: could not read Username for 'https://xx.xxx.net': Device not con...

新安装的AndroidStudio,在使用Android Studio push代码的时候,报错:

Invocation failed Unexpected end of file from server
java.lang.RuntimeException: Invocation failed Unexpected end of file from server
    at git4idea.GitAppUtil.sendXmlRequest(GitAppUtil.java:30)
    at 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 git4idea.GitAppUtil.sendXmlRequest(GitAppUtil.java:27)
    ... 1 more
error: unable to read askpass response from '/Users/xxx/Library/Caches/Google/AndroidStudio2021.2/tmp/intellij-git-askpass-local.sh'
fatal: could not read Username for 'https://xx.xxxx.net': Device not configured

解决办法:
Android Studio设置,Version Control-Git- 【Use credential helper】勾选即可


image.png

你可能感兴趣的:(Android Studio git push 报错fatal: could not read Username for 'https://xx.xxx.net': Device not con...)