3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS CodeCommitでMFA認証してHTTPSで通信する方法

Last updated at Posted at 2020-04-07

Assume Role実施(以下はサンプルです)

RESPONSE = `aws sts assume-role \
        --duration-seconds 3600 \
        --role-arn $arn \
        --role-session-name session-$timestamp \
        --token-code $token \
        --serial-number $number \
        --profile xxx`

export AWS_ACCESS_KEY_ID=`echo ${RESPONSE} | jq .Credentials.AccessKeyId -r`
export AWS_SECRET_ACCESS_KEY=`echo ${RESPONSE} | jq .Credentials.SecretAccessKey -r`
export AWS_SESSION_TOKEN=`echo ${RESPONSE} | jq .Credentials.SessionToken -r`

以下の設定をCodeCommitのリポジトリに設定しましょう

$ git config --local credential.helper '!aws codecommit credential-helper $@'
$ git config --local credential.UseHttpPath true

ちょっとこれだけだと不親切な記事だと思うので、後日補足予定です。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?