[英]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 密钥,您有(如这里):
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.