idea连接GitHub提示Invalid authentication data. Connection reset
找了好多都不好用,什么no proxy。。。
都不对
问题描述:
好久没上idea,刚搭建个项目发现没法连接Git备份:提示如下:
Invalid authentication data. annot retry due to redirection, in streaming mode.
(无效的身份验证数据。在流模式下,由于重定向而重试。)
打开cmd-->运行ping github.com
发现网络不通:
打开打开:
http://github.global.ssl.fastly.net.ipaddress.com/ 进行查询IP地址,把查询到的IP地址,复制到自己的hosts文件中。
hosts 文件位置(C:\Windows\System32\drivers\etc)及编辑方法:
找到记事本--->右键以管理员方式打开
打开host文件位置,开始为空,选择类型(*所有类型)
将打开查找到的路径ip
将ip配置到host:方法如下显示
在文档最末尾添加:
然后点击保存
再次打开cmd,重新ping下github.com
然后返回idea-----------别急,发现还是不好使:
然后看到提示:enter token
搜了一下发现设定完host下的ip后,https://github.com/网站打不开了,额... ...
注释刚加的host里的ip地址一行:https://github.com/就打开了,尴尬不》》继续解决:
登入个人账号-->Settings-->Developer settings--->Personal access tokens--->
Personal access tokens function like ordinary OAuth access tokens. They can be used instead of a password for Git over HTTPS, or can be used to authenticate to the API over Basic Authentication.
个人访问令牌的功能与普通 OAuth 访问令牌一样。它们可以通过 HTTPS 代替 Git 的密码使用,也可以用于通过基本身份验证对 API 进行身份验证。
select scopes 下面勾选类似于你付此次token生成之后使用此token权限的选择项,根据需要选择你要使用本次token的权限。
滚动到最下面有一个生成token的按钮:
之后会有一段如下的显示:
是你自己的账号的token: