才知道不是我一个人遇到这个问题。
https://stackoverflow.com/questions/68775869/support-for-password-authentication-was-removed-please-use-a-personal-access-to
这个帖子昨天发的,现在就有几千的浏览量了。
1. 产生token
Here are steps to generate Personal access tokens.
Click Here - https://github.com/settings/tokens
Step 1 - Open GitHub and log in with your credentials.
Step 2 - Click on the Setting menu.
Step 3 - From the Setting menu click on Developer Settings
Step 4 - From the Developer Settings, menu click on Personal access token
Step 5- From the Personal access token click on the Generate new Token button.
Step 6 - Now fill up required details like Note, Expiration, Select scopes. And then click on below Generate Token button.
Step 7 - After that new token has been generated. Copy that generated token and use this token to access git with username and token.
2. 与github关联git
2.1 windows系统操作
If you are using WINDOWS then please follow below step
Open Control Panel => User Accounts => Manage your credentials => Windows Credentials.
It will show all generic credentials. find your GitHub URL and click on that Now click on the edit button. and then add the Personal access token generated from GitHub into the password filed. And click on save.
Now you can access git.
If you are access git in android studio, if ask for a password then add GitHub Personal access token instead of your password.
2.2 mac系统操作
- Goto: this link (settings -> developers setting -> personal access tokens).
注意这里权限全部勾上 - Generate a new token and copy-paste it somewhere safely.
- Now search for an App in your Mac, named
Keychain Access
. - Search for
github.com
, double-click it.
注意这里需要找到“Internet password” - Click on show password, then enter your mac's password and hit enter.
这里是双击“Internet password”,然后展示密码 - Password should be visible by now. Now, just paste the token you generated in step 2 and click
Save changes
.
然后git写账号密码的时候,就写这个token就可以了。