[软件工具] [Android Studio git] 无法push提交代码 error: unable to read askpass

问题记录 问题记录 9634 人阅读 | 0 人回复

使用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'

image.png

版本库信息

公司内部使用的gogs,使用其他的一样的解决逻辑,与使用的东西无关,配置问题 image.png

修复

设置中,按照下图操作

image.png

验证

再次push,弹出输入框 image.png

输入密码后,点击push 成功执行

image.png

common_log.png 转载务必注明出处:程序员潇然,疯狂的字节X,https://crazybytex.com/thread-91-1-1.html

关注下面的标签,发现更多相似文章

文章被以下专栏收录:

    黄小斜学Java

    疯狂的字节X

  • 目前专注于分享Java领域干货,公众号同步更新。原创以及收集整理,把最好的留下。
    包括但不限于JVM、计算机科学、算法、数据库、分布式、Spring全家桶、微服务、高并发、Docker容器、ELK、大数据等相关知识,一起进步,一起成长。
热门推荐
海康摄像头接入 wvp-GB28181-pro平台测试验
[md]### 简介 开箱即用的28181协议视频平台 `https://github.c
[CXX1300] CMake '3.18.1' was not
[md][CXX1300] CMake '3.18.1' was not found in SDK, PATH, or
[若依]微服务springcloud版新建增添加一个
[md]若依框架是一个比较出名的后台管理系统,有多个不同版本。