: remote: this repository, you must use the HTTPS remote with a person-6ren">
gpt4 book ai didi

git clone 不工作,错误 "To access this repository, you must use the HTTPS remote with a personal access token or SSH with an SSH key"

转载 作者:行者123 更新时间:2023-12-05 00:44:10 34 4
gpt4 key购买 nike

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

如错误中所述,我浏览了 url- https://docs.github.com/articles/authenticating-to-a-github-organization-with-saml-single-sign-on/ ,并按照步骤配置 SSL 授权。

此外,我按照以下步骤生成新的 SSH key 并存储在 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 .

enter image description here

另外,我已经配置了个人访问 token 。下面是截图:

enter image description here

不过,我遇到了与上述相同的错误。

如果需要更多信息,请告诉我。

最佳答案

检查您的 SSH key 是否具有 (as in here):

  • 启用单点登录
  • 授权您的组织

然后使用 SSH URL 重试

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

关于git clone 不工作,错误 "To access this repository, you must use the HTTPS remote with a personal access token or SSH with an SSH key",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67879615/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com