MacOS github push 错误 ‘Authentica

2021-08-30  本文已影响0人  大云云SAMA

此文章针对2021年8月13日以后github强制token认证的error,密码错误的请查阅其他文章。

2021年8月13日以后,github不再接受用户名密码方式推送代码。Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

下面是解决方案:

登录github,进入个人中心settings,下拉左侧list,找到Developer settings,选择Personal access tokens,选择generate new token ,根据需求选择权限范围,生成 token。

复制token,关闭此页后token不再能查询到,请妥善保管。否则重新生成一遍。

windows用户请自行查找github.com配置方法,修改password为token

Mac&Linux用户打开终端进行设置:

git remote set-url origin https://<githubtoken>@github.com/<username>/<repositoryname>.git

再次git push,认证通过!

上一篇 下一篇

猜你喜欢

热点阅读