5

GitHub不再支持密码登录验证

 2 years ago
source link: https://icodex.me/2021/10/30/GitHub%E4%B8%8D%E5%86%8D%E6%94%AF%E6%8C%81%E5%AF%86%E7%A0%81%E7%99%BB%E5%BD%95%E9%AA%8C%E8%AF%81/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

GitHub不再支持密码登录验证

2021年10月30日 · One min read
Front End Engineer

GitHub 取消密码登录验证的方式

2021 年 8 月 13 日以后,GitHub 宣布不再支持密码登录的客户端授权方式

image-20210922195230530

解决方式

git - Support for password authentication was removed. Please use a personal access token instead - Stack Overflow

参考 StackOverflow 上的解释,现在只能通过在 GitHub 网站生成 PAT (Personal Access Token)的方式保存在客户端来进行校验和授权。

生成 PAT

在 GitHub 官网生成 PAT 按照以下方式:

  1. 右上角点击个人头像,找到 Settings 并打开;
  2. 然后在 Settings 面板左侧目录找到 Developer Settings,点击进去就可以看到 Personal access tokens

image-20210922200800547

设置 PAT

生成 PAT 以后呢,以 windows10 系统为例,在控制面板 => 个人账户下找到凭据管理器

image-20210922201159423

然后点击右侧 Windows 凭据,找到git:https://github.com,如果没有就点击添加,用户名就是邮箱地址,密码是刚才生成的 token,保存即可。

image-20210922201533179

注意

如果本地设置了 Git 代理地址,则需要重置代理

git config --global https.proxy http://127.0.0.1:1080

git config --global https.proxy https://127.0.0.1:1080

git config --global --unset http.proxy

git config --global --unset https.proxy

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK