2021 年 8 月 13 日删除了对密码身份验证的支持[重复]

问题描述 投票:0回答:6

我已经使用了很长一段时间的 tortoise git,今天我无法使用 tortoise git 并出现以下错误。

git.exe pull --progress -v --no-rebase "origin" 远程:支持 密码验证已于 2021 年 8 月 13 日删除。请使用 相反,个人访问令牌。远程:请参阅 https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ 了解更多信息。

我正在使用最新的 tortoise git 版本。 enter image description here

我了解 git 的最新变化。但我想用乌龟git。有人请帮我解决这个问题。

git github tortoisegit personal-access-token git-authentication
6个回答
62
投票

Github 已于 2021 年 8 月 13 日取消对密码验证的支持,并给出以下回复:

Support for password authentication was removed on August 13, 2021

要解决此问题,请按照以下步骤操作:

  1. 转到Github帐户设置
  2. 查找并选择开发者设置
  3. 查找并选择个人访问令牌
  4. 生成新代币
  5. 填写任何备注并选择访问范围
  6. 完成后点击生成令牌

使用生成的令牌代替密码与 GitHub 进行通信。


26
投票

使用以下步骤可以避免此问题。

https://github.com/settings/tokens,去生成一个令牌。

同时

git clone, push, pull
使用以下凭据。

用户名:user_github_用户名

password:add_ generated_token 而不是密码。


8
投票

实际上,git想要在本地机器中存储令牌而不是密码。

因此您可以在 MAC 上修复此问题

  1. 点击个人资料图片

  2. 进入设置

  3. 然后点击“个人访问令牌并生成新令牌”如图 enter image description here

  4. 然后输入令牌名称+选择到期日期并选择您想要授予的权限,然后单击“生成屏幕底部的令牌” enter image description here

  5. 打开钥匙串访问并搜索github并双击github帐户 enter image description here

  6. 最后一步是将 github 令牌粘贴到密码字段中。这就是你所要做的。 enter image description here


5
投票

请按照以下步骤解决问题。

  1. 使用

    git update-git-for-windows

    更新您的 git 版本
  2. 在 Windows 开始按钮中,搜索 Credential Manager 并打开。

  3. 点击Windows Credential,搜索并删除 GitHub 凭证。

  4. 现在使用tortoise git,拉取代码。您将看到以下弹出窗口。

enter image description here

  1. 在弹出窗口中单击使用浏览器登录,现在您可以像之前一样使用 tortoise git 。

2
投票

仅使用令牌而不是密码对我来说不起作用。这是我所做的所有步骤:

  1. 在开发者设置中生成令牌
  2. 在所有地方使用新令牌(钥匙链、Intellij 内部、终端中)。确保您令牌保存在某处,因为您无法再次看到它,除非重新生成它。
  3. 我的组织已启用 SAML SSO。我进入令牌并配置了 SSO 并对我的组织进行了身份验证。可以在此处
  4. 找到 SAML SSO 的步骤

完成以上3个步骤后,我就可以成功无密码访问git了。


1
投票

只需按照简单的三个步骤即可将您的存储库推送到 git 中...

在此之前,您可以先运行以下命令

git init
git status
git add .
git branch -M main

  1. git remote set-url origin [email protected]:<username>/<repository_name>.git
  2. git commit -am "your comments"
  3. git push --set-upstream origin main
© www.soinside.com 2019 - 2024. All rights reserved.