【问题标题】:aws codecommit not giving credentials promptaws codecommit 未提供凭据提示
【发布时间】:2021-07-02 03:17:07
【问题描述】:

我(错误地)在克隆 AWS CodeCommit 存储库时输入了无效的 codecommit 凭证,现在 git clone https://git-codecommit.us-east.... 给出 443 错误并且不提示输入用户名。

提示在一次尝试失败后似乎已被禁用,请帮助我如何再次启用它。

我试过了:

git clone https://usenmae@git-codecommit.........

也一样,但即使这样也行不通

我已使用以下方式设置用户名:

git config --local user.name <myuser>

但即使这样也行不通

【问题讨论】:

    标签: git amazon-web-services git-clone aws-codecommit


    【解决方案1】:

    将这些行放入您的 ~/.gitconfig 并保存:

    [credential "https://git-codecommit.*.amazonaws.com"]
        helper = !aws codecommit credential-helper $@ 
        UseHttpPath = true
    
    

    然后关闭并打开一个新的命令行窗口 (git bash) 并确保您使用的 URL 如下:https://git-codecommit.*.amazonaws.com 没有用户名和密码。你可以在这里阅读:https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-gc.html

    如果它不起作用,请尝试取消设置 config-credentials 并重试。这对我有用:https://confluence.atlassian.com/bbkb/why-am-i-not-prompted-for-password-when-pushing-or-pulling-to-my-repositories-in-bitbucket-cloud-via-https-800293400.html:

    git config --global --unset credential.helper

    【讨论】:

      【解决方案2】:

      我猜你已经设置了记住 https 凭据的方法:

      git config --global credential.helper store
      

      您可以更改~/.gitconfig 中的凭据。或者你可以unset 助手使用:

      git config --global credential.helper unset
      

      或者,您可以在 git clone 中明确提供用户名和凭据:

      git clone https://<git-user-from-iam>:<git-pass-from-iam>@git-codecommit.....
      

      【讨论】:

        猜你喜欢
        • 2018-05-07
        • 1970-01-01
        • 2022-08-19
        • 1970-01-01
        • 2019-02-25
        • 2017-08-16
        • 1970-01-01
        • 2014-12-08
        • 2022-08-04
        相关资源
        最近更新 更多