美文网首页
AndroidStudio git拉代码报错Unexpected

AndroidStudio git拉代码报错Unexpected

作者: gaom明 | 来源:发表于2022-09-14 13:29 被阅读0次

git console 日志错误信息:
Invocation failed Unexpected end of file from server
java.lang.RuntimeException: Invocation failed Unexpected end of file from server
error: unable to read askpass response from 'C:\Users\navinfo\AppData\Local\Google\AndroidStudio2021.2\tmp\intellij-git-askpass-local.sh'

问题原因:
AndroidStudio git账户密码认证框弹不出来, 需要自己修改git地址, 在地址中包含用户名密码.

解决方案1:
工具栏->git->manage remotes
修改git地址, 插入用户名密码
原地址:https://git.你的git仓库地址.git
修改后:https://username:password@git.你的git仓库地址.git

image.png

解决方案2:
打开电脑中的gitbase命令窗口
输入命令cd到项目本地目录(注意修改斜杠\为反斜杠/)
cd D:AndroidProject/mediacontrolservice 输入命令vim .git/config vim .git/config
输入字母"i"进入编辑模式, 编辑git地址中插入username:password@
输入字母"ZZ"保存并退出即可

image.png

gitbase命令参考:
https://blog.csdn.net/qianggezhishen/article/details/50728915

相关文章

网友评论

      本文标题:AndroidStudio git拉代码报错Unexpected

      本文链接:https://www.haomeiwen.com/subject/xtokortx.html