github push 要求密码,但是密码已经弃用的解决方案

参考资料:https://bobbyhadz.com/blog/support-for-password-authentication-was-removed-on-august

 

1. 创建 github personal access token

  1. Visit https://github.com and in the upper-right corner, click on your profile picture and then click Settings.

click profile photo click settings

  1. In the left sidebar, click on < > Developer settings.

click developer settings

  1. In the left sidebar, click on Personal access tokens and then Tokens (classic).

  2. From the Generate new token dropdown menu select Generate new token (classic).

generate new token classic

  1. Give your token a descriptive name.

give your token a name

  1. Select when the token should expire from the dropdown menu. I'll use the default expiration of 30 days.

  2. I'll check all checkboxes in the Select scopes section, but you can only select the scopes you require for fine-grained control.

select scopes check all checkboxes

  1. Click on the Generate token button.

click generate token

  1. IMPORTANT - Make sure to copy your Personal Access Token now. You won't be able to see it again.

copy personal access token

  1. Treat your access token like a password. You can enter your token instead of your password when performing Git operations over HTTPS.

  2. Store your Personal Access token in a local file or in a secure remote password manager.

 

 

If you need to clone a private GitHub repository or push to a repository, you can use your Personal Access Token when you get prompted for a password.

 

 

以后输入密码输入这个 personal token 就行

 

posted @   yinhuachen  阅读(51)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示