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到项目本地目录(注意修改斜杠\为反斜杠/)
vim .git/config
输入字母"i"进入编辑模式, 编辑git地址中插入username:password@
输入字母"ZZ"保存并退出即可
image.png
gitbase命令参考:
https://blog.csdn.net/qianggezhishen/article/details/50728915