推送给代码报错 unable to read askpass response from 'C:\Users\Urasaki\AppData\Local\Google\AndroidStudio2021.1\tmp\intellij-git
推送给代码报错 unable to read askpass response from 'C:\Users\Urasaki\AppData\Local\Google\AndroidStudio2021.1\tmp\intellij-git-askpass-local.sh',具体报错见以下内容
Invocation failed Unexpected end of file from serverjava.lang.RuntimeException: Invocation failed Unexpected end of file from serverat 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 serverat 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 moreerror: unable to read askpass response from 'C:\Users\Urasaki\AppData\Local\Google\AndroidStudio2021.1\tmp\intellij-git-askpass-local.sh'bash: /dev/tty: No such device or addresserror: failed to execute prompt script (exit code 1)fatal: could not read Username for 'https://gitee.com': No such file or directory
我用的码云(或GitHub)推送代码,当我改了账户的密码后,推送代码一直失败,报错 unable to read askpass response from。
有两个这个原因,以下原因也可能造成推送代码失败
码云(或github、gitlab)账号信息变动(比如:修改可账号的密码或者用户名)。
IDEA(或Android Studio)中代码管理工具Git没有设置ssh key。
找到在项目根目录中的.git文件(是隐藏的,先让他显示出来,见下图一和下图二)
找到.git文件中的config文件(见下图一),打开这个文件,找到这一项([remote "origin"]),如果红圈处的那一行是以url = https://(或url = http://)开头的,需要修改这里(见下图二),如果红圈处的那一行是以url = ssh://git@开头的,那请查看方案二。
[remote "origin"]
url = https://xxxxxxxxxxx:xxxxxxxx@gitee.com/urasaki/RxJava2AndRetrofit2.git
fetch = +refs/heads/*:refs/remotes/origin/*
如果项目根目录下的.git文件中的config文件(见下图一),打开这个文件,找到这一项([remote "origin"],见下图二),红圈处的那一行是以url = ssh://git@开头的,那就是因IDEA(或Android Studio)中代码管理工具Git没有设置ssh key(或者设置的ssh key不对)引起的推送代码失败。
解决方法:
如果是Mac 电脑请查看博客Mac Git 如何设置ssh key_ErwinNakajima的博客-CSDN博客
如果是windows 电脑请查看博客Git配置SSH KEY_萧木易的博客-CSDN博客_git sshkey
配置完成之后就可以正常推送(push)代码了。
来源地址:https://blog.csdn.net/NakajimaFN/article/details/127075347
--结束END--
本文标题: IDEA(或Android Studio)推送(push)代码报错 unable to read askpass response from ‘C:\Users\Urasaki\AppData\Loc
本文链接: https://lsjlt.com/news/401649.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0