简体   繁体   English

git 克隆无法使用错误“要访问此存储库,您必须使用带有个人访问令牌的 HTTPS 遥控器或带有 SSH 密钥的 SSH”

[英]git clone not working with error " To access this repository, you must use the HTTPS remote with a personal access token or SSH with an SSH key"

Git is throwing below error when trying to run the command Git 在尝试运行命令时抛出以下错误

git clone <<clone url>>:
remote: this repository, you must use the HTTPS remote with a personal access token
remote: or SSH with an SSH key and passphrase
remote: that has been authorized for this organization. Visit
remote: https://docs.github.com/articles/authenticating-to-a-github-organization-with-saml-single-sign-on/ for more information. The requested URL returned error: 403

As mentioned in the error I went through the url- https://docs.github.com/articles/authenticating-to-a-github-organization-with-saml-single-sign-on/ , and followed the steps to configure SSL authorization.如错误中所述,我浏览了 url- https://docs.github.com/articles/authenticating-to-a-github-organization-with-saml-single-sign-on/ ,并按照步骤进行配置SSL授权。

In addition, I followed the steps for generating new SSH key and storing in SSH agent following this url: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent .此外,我按照步骤生成新的 SSH 密钥并存储在 url 之后的 SSH 代理中: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh /generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

在此处输入图像描述

Also, I have configured the personal access token.此外,我还配置了个人访问令牌。 Below is the screenshot:下面是截图:

在此处输入图像描述

Still, I am getting the same error as above.尽管如此,我还是遇到了与上述相同的错误。

Please let me know if further information is needed.如果需要更多信息,请告诉我。

Check that, for your SSH key, you have ( as in here ):检查,对于您的 SSH 密钥,您有(如这里):

  • enable SSO启用 SSO
  • authorize your organization授权您的组织

Then try again, using an SSH URL然后再试一次,使用 SSH URL

git clone git@github.com:<organization>/<repo>

You have to regenerate your ssh key with passphrase您必须使用密码重新生成 ssh 密钥

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Git 推送不起作用错误“您必须使用个人访问令牌或 SSH 密钥” - Git push is not working Error “You must use a personal access token or SSH key” Git:使用密钥文件通过ssh访问远程存储库,但不使用〜/ .ssh / config - Git: access a remote repository over ssh using a key file but without using ~/.ssh/config 如何使用令牌从 jenkins 连接到 gitlab? 您必须使用带有“read_repository”的个人访问令牌 - How to connect to the gitlab from jenkins with token? You must use a personal access token with 'read_repository' 克隆使用ssh远程git仓库 - Clone a remote git repository using ssh 通过SSH设置远程GIT存储库? (无代码访问远程位置) - Setup remote GIT repository via SSH? (No code access to the remote location) Git推送到远程存储库给出致命错误SSH HTTPS - Git push to remote repository gives fatal error SSH HTTPS 如何使用默认的git clone语句代替个人访问令牌? - How to use default git clone statement instead of personal access token? Git克隆不适用于ssh或https,但适用于http - Git clone not working for ssh or https but is working for http 尽管仅提供ssh访问,但仍使用https访问git存储库 - Accessing a git repository using https, despite it providing ssh access only 无法使用SSH密钥从远程服务器访问bitbucket,以对存储库中的最新代码执行git pull - Unable to access bitbucket from remote server using SSH key to perform a git pull on latest code in repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM