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 就行

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值