美文网首页
MacOS github push 错误 ‘Authentica

MacOS github push 错误 ‘Authentica

作者: 大云云SAMA | 来源:发表于2021-08-30 16:30 被阅读0次

此文章针对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,认证通过!

相关文章

网友评论

      本文标题:MacOS github push 错误 ‘Authentica

      本文链接:https://www.haomeiwen.com/subject/rjroiltx.html