IDEA Push代码到 Github报错:AggregateException encountered

1、问题描述

当使用Intellij IDEA push代码到github时,报错:
Push failed
Failed with error: AggregateException encountered.
unable to read askpass response from ‘(某路径名)\intellij-git-askpass.bat’
failed to execute prompt script (exit code 1)
could not read Username for ‘https://github.com’: No error

2、错误原因

(1) git版本过低。可以使用cmd,输入git --version,查看版本。2.16.x版本以下,会出现该问题。

3、解决办法

(1) 下载更高版本的git:git下载地址 我下载的是当前最新版git version 2.26.1.windows.1
(2) 安装完后(默认安装即可),用git --version进行验证。
(3) 重新push,提交成功。(会需要输入github账号密码)

如果你没有设置github访问权限,请参考下一步设置github访问权限。

4、设置github访问的权限

(1) 在setting中,设置github访问权限
IDEA Push代码到 Github报错:AggregateException encountered
(2) 创建api token
登录时,报错如下:can’t login:Connection reset。原因是github.com网站连接不稳定。
IDEA Push代码到 Github报错:AggregateException encountered
(3) 添加当前网络连接github最稳定的网址到host
查询当前网络访问github.com的网址,连续查询几次,取出现次数最多的结果。ip查询网址
IDEA Push代码到 Github报错:AggregateException encountered
将ip添加到host
IDEA Push代码到 Github报错:AggregateException encountered
连接成功后,会自动生成token。
IDEA Push代码到 Github报错:AggregateException encountered