今天提交代码,push到GitHub上,突然出现这个问题。
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/zhoulujun/algorithm.git/': The requested URL returned error: 403
官方的解释:https://github.blog/changelog/2021-08-12-git-password-authentication-is-shutting-down/
As previously announced, starting on August 13, 2021, at 09:00 PST, we will no longer accept account passwords when authenticating Git operations on GitHub.com. Instead, token-based authentication (for example, personal access, OAuth, SSH Key, or GitHub App installation token) will be required for all authenticated Git operations. Please refer to this blog post for instructions on what you need to do to continue using git operations securely. Removal
大致意思是,密码验证于2021年8月13日不再支持,也就是今天intellij不能再用密码方式去提交代码。请用使用?personal access token?替代。
这个去年年底就说了,https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
In July 2020, we announced our intent to require the use of token-based authentication (for example, a personal access, OAuth, or GitHub App installation token) for all authenticated Git operations. Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations on GitHub.com.
自己鼓捣了一遍 Token,烦人的很。还是觉得直接ssh 的方式操作git就好(之前是ssh的源,也没有这个问题)。
这里讲的是Mac OS 操作。windows可以借鉴?
查看ssh目录
ls?-al?~/.ssh
Mac OS目录~/.ssh,windows目录是:? Users/uestc/.ssh/id_rsa
?-如果有配过,会列出:
?-如果没有配过,那么就进入第二步
ssh-keygen?-t?rsa?-b?4096?-C?"uestchan@sina.com"
接着会提示这个公钥私钥的保存路径-建议直接回车就好(默认目录里)
接着提示输入私钥密码passphrase - 如果不想使用私钥登录的话,私钥密码为空,直接回车
生成成功后,把??id_rsa.pub 拷贝到 github? 新建的 SSH keys 中
配置好好,记住,你项目得使用 SSH clone
如果本地是https 源,那么就修改git 仓库地址
方法有三种:
顺手安利下?《git宝典—应付日常工作使用足够的指北手册》
关于github 建议让换 Token的形势,操作如下
打开自己的GitHub主页,点击自己的头像找到Settings并进入,在左边目录栏找到Personal access tokens,点击Generate new token,按照步骤申请即可,过程简单。Scopes(范围)那里建议全选。
Token申请成功后,将Token复制到Token一栏中
操作路径:
生成新的token就好。权限我是全部勾选上的。
打开Settings(File-->Settings) --> 在搜索栏内输入git,回车跳转到Git配置页面 --> 将git的运行路径填入Path to Git executable一栏(一般IDEA会自动定位)
第一种方法可以选择使用帐号密码认证(Password)
之前的老板是这样的
在Login一栏填入你GitHub的用户名 --> Password那栏填入你GitHub的登录密码?
现在新版本的,点击密码登录,会自动跳转到登录验证页面,在验证页面点击确定(我的密码是chrome记住的)。就自动登录
选择log width token,填入token就好
参考文章:
github配置SSH免密登录 https://blog.csdn.net/qq_38163309/article/details/105335097
GIT免密登录神器 SSH KEY配置详解?https://blog.csdn.net/w15321271041/article/details/80535135
Intellij IDEA 使用GitHub+Git https://www.cnblogs.com/yysbolg/p/8566389.html
Intellij IDEA 协同 Git 与 GitHub 进行开发使用 https://www.jianshu.com/p/ea1703adf5cc
Github 生成token的方法 — IDEA 拉代码或push失败需要从新校验Token https://blog.csdn.net/SR02020/article/details/106882205
Intellij IDEA 协同 Git 与 GitHub 进行开发使用 https://www.jianshu.com/p/ea1703adf5cc
前言 有时,您将需要构建一个JavaScript倒数时钟。您可能有活动,销售,促销或游...
当前,5G、 云计算 、大数据等新技术迅速发展,为人类社会带来了无限发展机遇。...
TOP云 (west.cn)11月7日消息,据米友厘米曝料,自己持有的单拼 域名 ding.life...
解析 域名 需要多少钱?如果是在 TOP云 设置域名解析,是不需要收费的。TOP云默...
国内较好的数据外包公司、数据服务公司、数据采集公司有哪些?你上榜了吗?近几...
随着互联网的发展,电子商务越来越火爆,交易额越来越高。 2012年第三季度中国电...
本文转载自微信公众号「KK架构师」,作者wangkai。转载本文请联系KK架构师公众号...
介绍常见的安全组配置示例。如下示例中,出方向默认全通,仅介绍入方向规则配置...
1. 接口描述 接口请求域名: cvm.tencentcloudapi.com 。 本接口 (InquiryPriceR...
本文转载自微信公众号「 码农读书」,作者 码农读书 。转载本文请联系 码农读书...