世界最大同性交友网站七夕大礼包————remote :Support for password authentication was removed on August 13,

世界最大同性交友网站七夕大礼包————remote :Support for password authentication was removed on August 13,

原创文章,转载注明出处! 原载于我的博客(点击前往)

1.问题背景-background

七夕晚上,作为single dog的你下班以后发现自己居然无地可去,想了想,哎,还是回去加班吧,公司真是个逃避现实的好地方。码完代码才发现已经11点了,准备提交完代码就回家睡觉。打开git,输完账号密码,突然弹出这么一句话:remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
大概意思就是你原先的密码凭证从2021年8月13日开始就不能用了,必须使用一个叫personal access token的玩意!

滚!我tm懒得弄!

Github 官方解释,不想看可以略过

We described our motivation as we announced similar changes to authenticating with the API as follows:

In recent years, GitHub customers have benefited from a number of security enhancements to GitHub.com, such as two-factor authentication, sign-in alerts, verified devices, preventing the use of compromised passwords, and WebAuthn support. These features make it more difficult for an attacker to take a password that’s been reused across multiple websites and use it to try to gain access to your GitHub account. Despite these improvements, for historical reasons customers without two-factor authentication enabled have been able to continue to authenticate Git and API operations using only their GitHub username and password.

Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations and will require the use of token-based authentication, such as a personal access token (for developers) or an OAuth or GitHub App installation token (for integrators) for all authenticated Git operations on GitHub.com. You may also continue using SSH keys where you prefer.

Tokens offer a number of security benefits over password-based authentication:

1.Unique – tokens are specific to GitHub and can be generated per use or per device

2.Revocable – tokens can can be individually revoked at any time without needing to update unaffected credentials

3.Limited – tokens can be narrowly scoped to allow only the access necessary for the use case

4.Random – tokens are not subject to the types of dictionary or brute force attempts that simpler passwords that you need to remember or enter regularly might be

大概意思就是:为了保证各位程序员的账户安全,我们已于2021年7月14日禁止大家在git及第三方应用上通过密码授权GitHub。以后将使用token令牌代替密码。
(话说能活跃在全球最大同性交友网站的程序猿能有什么秘密值得如此加密。。。)

2.什么是token令牌?

token令牌相当于在第三方接口代替你密码的一个玩意,有点像强密码。但是,token令牌并不是只能有唯一一个的。你可以拥有多个令牌,给不同的第三方接口不同的令牌,而每个令牌都被赋予了不同的权限和使用期限。也就是说,在令牌没赋予的权利将不会给第三方接口和git。当然,token令牌在你设定的期限之后,对应的第三方接口和git就需要你重新给一个令牌,否则也无法使用。令牌也可以随时更改权限和删除。

3.如何申请token令牌?

登陆你的GitHub(注意,在github.com登录你的账户时还是用你的密码,不是令牌) 点击头像。随后点击settings。

往下拉,你会在左侧看到一个Developer settings。点击它。

左侧有Personal access tokens。点击它。

点击右侧generate new token。

Note是你令牌的名称(不是令牌密码),随便填一个。

expiration是令牌有效期限。No expiration代表永久令牌。

下面是选择相应的权限。一般就选择repo 和delete_repo,其他按需勾选。

拉到最下面,点击generate token,随后跳出来一个界面,有一串绿底字符串即为你的token令牌。

警告!!在这里你一定要将其复制并保存好!建议新建一个txt文件将令牌放入其中!因为这个令牌只会出现一次,你关闭了这个网页,以后GitHub就再也不会告诉你这个令牌了!妥善保管!(妥善保管!两情若是久长时,又岂在朝朝暮暮?)

返回刚才的界面,你可以查看已经创建的token和给予的权限与有效期。你可以随时更改,管理,删除它们(但是不会显示该令牌)。

随后回到你的git或第三方接口,账号还是输入你的username(用户名),password就输入你复制的令牌。随后登陆就成功了。

不愧是全球最大的同性交流网站,大七夕节的非得给single dogs塞礼物啊!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值