[Android Studio git] 无法push提交代码 error: unable to read askpass
使用Android Studio 检出代码后,提交修改时,无法提交,报错。### 报错信息
```
Writing objects: 100% (30/30), 8.43 KiB | 4.22 MiB/s, done.
Total 30 (delta 6), reused 0 (delta 0), pack-reused 0
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 'C:\Users\PC\AppData\Local\Google\AndroidStudio2021.2\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://192.168.1.88:9527': No such file or directory
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'http://192.168.1.88:9527/XXX项目/androidXXXXXX.git'
```
!(data/attachment/forum/202207/22/174544bazxxdtz235i3ox5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
### 版本库信息
公司内部使用的gogs,使用其他的一样的解决逻辑,与使用的东西无关,配置问题
!(data/attachment/forum/202207/22/174134wwwmm9rhmwyvzjjm.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
### 修复
设置中,按照下图操作
!(data/attachment/forum/202207/22/174210ry1x0bd7wlph0rq5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
### 验证
再次push,弹出输入框
!(data/attachment/forum/202207/22/174310kvvmtgqv5czzrcvg.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
输入密码后,点击push成功执行
!(data/attachment/forum/202207/22/174337nrvzk1r4nndv6dnt.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
!(data/attachment/forum/202206/16/141330jha7st9soow8772i.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "common_log.png")
`转载务必注明出处:程序员潇然,疯狂的字节X,https://crazybytex.com/thread-91-1-1.html `
页:
[1]