gpt4 book ai didi

git - 在询问用户名和密码 (MacOS) 后使用 AWS CodeCommit 时出现 403 错误

转载 作者:行者123 更新时间:2023-12-04 11:46:07 39 4
gpt4 key购买 nike

我一直在使用 AWS CodeCommit 一段时间,但目前遇到以下问题,不知道它出现的原因是什么:

  • 尝试运行任何 git 命令后,我得到一个对话框,如我 have removed git-credential-osxkeychain从钥匙串(keychain)访问控制列表。按“拒绝”(如果不这样做,我会立即收到 403)。
  • 按“拒绝”后,它给了我
    'NoneType' object has no attribute 'secret_key'
  • 然后它问我用户名和密码
    Username for 'https://git-codecommit.ap-northeast-1.amazonaws.com/v1/repos/somerepo': username
    Password for 'https://username@git-codecommit.ap-northeast-1.amazonaws.com/v1/repos/somerepo':
  • 在此处提供正确的凭据后,我收到 403 错误
    fatal: unable to access 'https://git-codecommit.ap-northeast-1.amazonaws.com/v1/repos/somerepo/': The requested URL returned error: 403

  • 我已经尝试重新安装和重置 AWS CLI 和 Git 凭证,仔细检查了可能的解决方案 herealso here ,按照所有说明进行操作,但没有任何帮助。

    请帮助我提供一些可能的解决方案。如果需要任何其他信息,请告诉我。谢谢!

    最佳答案

    引用 https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html

    Step 1: Initial configuration for CodeCommit


    Step 2: Install Git


    Step 3: Create Git credentials for HTTPS connections to CodeCommit


    Step 4: Connect to the CodeCommit console and clone the repository


    第 1 步和第 2 步很常见,但您可能不知道第 3 步。
  • 转到 AWS 控制台
  • 转到您用于从 CLI 访问 codecommit 的 IAM 用户并生成用户名和密码。 (URL 看起来像 https://console.aws.amazon.com/iam/home?region=us-west-2#/users/\ )
  • 然后在终端出现提示时使用此用户名和密码。
  • 关于git - 在询问用户名和密码 (MacOS) 后使用 AWS CodeCommit 时出现 403 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54414949/

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