IDE 中登录 Github 报错 Invalid authentication data. 404 Not Found-Not Found.

发布时间 2023-06-02 10:34:05作者: JAVA_织梦者_TW

IDE 中登录 Github 报错 Invalid authentication data. 404 Not Found-Not Found.

 

一、方法一 使用token令牌进行身份验证(推荐)
相对于使用账号密码,token令牌是一种更安全的身份验证方式。
1、进入Github的token管理页面:https://github.com/settings/tokens
如下图可见,我之前在IDE中使用账号密码登录的Github时,插件帮我自动创建了多个token。
 

 

 

2、点击Generate new token 创建新的token
注意创建token时需勾选repo, gist, read:org, workflow权限。
token只会在创建后展示一次,之后将无法看到,请注意及时复制保存。

3、登录时点击右上角Use Token切换到token认证
账号密码认证界面:
 

 

Token认证界面:

二、方法二 使用账号密码(不行了)

The password is not saved and is only used to generate a Github token.
以往,其实是 IDE 会帮你创建 token。如今已经失效了,也就是本文所遇到的问题。

 

三、补充:命令行 fatal: Authentication failed for ‘https://github.com//.git/’
从 2021 年 8 月 13 日起,不能使用账号密码登录认证,而是需要使用个人访问令牌 Personal access tokens (PATs) 登录认证。
 

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/*******/*******.git/'