remote: Support for password authentication was removed on August 13, 2021.remote: Please see

  • 示例

0aa12c4122c94558aaf63f65dde046dc.png

  •  说明

可以通过两种方式从命令行访问 GitHub 上的仓库:HTTPS 和 SSH,两者的身份验证方式不同

  • 文档

github•github文档•Get started•身份验证•帐户安全性•使用命令行进行身份验证https://docs.github.com/zh/authentication/keeping-your-account-and-data-secure/about-authentication-to-github

在命令行上使用 HTTPS URL 将 git clonegit fetchgit pull 或 git push 执行到远程存储库时,Git 将要求你提供 GitHub 用户名和密码。 当 Git 提示你输入密码时,请输入你的personal access token。  或者,可以使用 Git Credential Manager 等凭据帮助程序

Git 的基于密码的身份验证已被删除

比如,在通过 HTTPS 执行 git clone 命令,系统会提示输入用户名和密码。 当系统提示输入密码时,如果有 personal access token,请输入 personal access token 而不是密码

 

9aa64d8d6537435c8fbf345841538f55.png


使用命令行进行身份验证

一、通过SSH从命令行访问GitHub上的仓库的身份验证方式

  • 文章

《Github生成SSH密钥,使用SSH进行连接》https://blog.csdn.net/Oracle475/article/details/139349474

二、通过HTTPS从命令行访问GitHub上的仓库的身份验证方式

(1)personal access token

  • 文档

github•github文档•Get started•身份验证•帐户安全性•管理personal access tokenhttps://docs.github.com/zh/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens

  • 说明

To access GitHub from the command line, you can use GitHub CLI or Git Credential Manager instead of creating a personal access token

GitHub 目前支持两种类型的 personal access token:

①fine-grained personal access token 

②personal access tokens (classic)

 GitHub 建议尽可能使用 fine-grained personal access token 而不是 personal access tokens (classic)

(2) GitHub CLI

  • 文档

GitHub CLIhttps://docs.github.com/zh/github-cli/github-cli/about-github-cli

(3)Git Credential Manager

  • 文档

Git Credential Manager​https://github.com/git-ecosystem/git-credential-manager/blob/main/README.md

 

  • 29
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值