简体   繁体   English

aws codecommit 未提供凭据提示

[英]aws codecommit not giving credentials prompt

I (mistakenly) put invalid codecommit credentials while cloning AWS CodeCommit repository, and now git clone https://git-codecommit.us-east.... is giving 443 error and not prompting for username.我(错误地)在克隆 AWS CodeCommit 存储库时放置了无效的 codecommit 凭证,现在 git 克隆 https://git-codecommit.us-east.... 给出 443 错误并且不提示输入用户名。

Looks like prompt has been disabled after one unsuccessful attempt, please help on how can I enable it again.一次尝试失败后提示已被禁用,请帮助我如何再次启用它。

I tried:我试过了:

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

as well, but even this is not working也一样,但即使这样也行不通

I have setup usename using:我使用以下方法设置用户名:

git config --local user.name <myuser>

but even this is not working但即使这样也行不通

I guess you've setup remembering of https credentials using:我猜你已经设置记住https凭证,使用:

git config --global credential.helper store

You can change the credentials in ~/.gitconfig .您可以更改~/.gitconfig中的凭据。 Or you can unset the helper using:或者您可以使用以下方法unset助手:

git config --global credential.helper unset

Alternatively, you can explicitly provide username and credentials in your git clone:或者,您可以在 git 克隆中明确提供用户名和凭据:

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

Put these lines in your ~/.gitconfig and save it:将这些行放入您的~/.gitconfig并保存:

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

Then close and open a new window of command line (git bash) and make sure that you are using the URL like: https://git-codecommit.*.amazonaws.com without username and password. Then close and open a new window of command line (git bash) and make sure that you are using the URL like: https://git-codecommit.*.amazonaws.com without username and password. You can read here: https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-gc.html你可以在这里阅读: https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-gc.html

If it didn't work, try to unset the config-credentials and try it again.如果它不起作用,请尝试取消设置 config-credentials 并重试。 It's work for me: 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 :这对我有用:https://confluence.atlassian.com/bbkb/why-am-i-not-prompted-for-password-when-pushing-or-pulling-to-my-repositories-in-bitbucket-cloud -通过-https-800293400.html

git config --global --unset credential.helper

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM