2021年8月13日, github不再支持用密码提交代码, 要使用token

2021年8月13日, github不再支持用密码提交代码, 要使用token.

官方的解释: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

  • August 13, 2021, at 09:00 PST

大致意思是,密码验证于2021年8月13日不再支持,也就是今天intellij不能再用密码方式去提交代码。请用使用 personal access token 替代。

若遇到类似问题:

Can't connect to any repository: https://github.com/automvc/helloxxx.git 
(https://github.com/automvc/helloxxx.git: cannot open git-receive-pack)

 或者:

Can't connect to any repository: https://github.com/automvc/helloxxx.git 
(https://github.com/automvc/helloxxx.git: authentication not supported)
 

可参考以下文章:

原文链接:https://blog.csdn.net/abckingaa/article/details/120802667

github要token提交代码后, 提交不了的解决方法_abckingaa的博客-CSDN博客

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
20211113开始,GitHub不再支持使用账号密码进行身份验证。为了提高安全性,GitHub推荐使用基于令牌(Token)的身份验证方式。下面是使用HTTPS方式提交代码GitHub的步骤: 1. 生成访问令牌(Token):登录到GitHub账号,点击右上角的头像,选择"Settings"。在左侧导航栏中选择"Developer settings",然后点击"Personal access tokens"。点击"Generate new token"按钮,输入一个描述性的名称,并选择需要的权限(如repo、workflow等),然后点击"Generate token"按钮。最后,复制生成的访问令牌。 2. 配置Git客户端:打开终端或命令行界面,执行以下命令配置Git客户端,将访问令牌添加到凭据存储中: ``` git config --global credential.helper store ``` 3. 克隆或配置远程仓库:在GitHub上创建一个新的仓库或者克隆一个已存在的仓库到本地。 4. 修改远程仓库的URL:进入本地仓库目录,执行以下命令修改远程仓库的URL,将用户名替换为你的GitHub用户名,将`<token>`替换为你生成的访问令牌: ``` git remote set-url origin https://<用户名>:<token>@github.com/<用户名>/<仓库名>.git ``` 5. 提交代码:现在你可以使用HTTPS方式提交代码GitHub了。执行以下命令将本地代码推送到远程仓库: ``` git push origin <分支名> ``` 请注意,生成的访问令牌具有与你选择的权限相对应的访问权限,请妥善保管并不要泄露给他人。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值