Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
Description
When adding an AWS CodeCommit Git repository from a Multi-Factor-Authentication (MFA) protected AWS account as a remote to a local Git repository we can add
[credential "https://git-codecommit.my-region.amazonaws.com/v1/repos/my-repo"] helper = !~/.local/bin/aws codecommit credential-helper --profile my-profile $@ UseHttpPath = true
to the Git config file.
However, on execution the aws codecommit credential-helper will prompt for entry of an MFA code periodically (when the previous MFA code has expired). Currently, there is no method to handle this situation through the SourceTree GUI. Instead, one has to call
echo -e "protocol=https\npath=/v1/repos/my-repo\nhost=git-codecommit.my-region.amazonaws.com" | aws codecommit credential-helper get --profile my-profile Enter MFA code for arn:aws:iam::1234567890:mfa/my-aws-iam-user:
from a shell to authenticate when cached credentials have expired. Only then interaction of SourceTree with AWS CodeCommit is possible (again).
Please provide a way to deal with the MFA code prompt as a user in the SourceTree GUI. For example, show a popup dialog for entering the MFA code when required and feed it back to the credential helper.