LoginSignup
1
0

More than 3 years have passed since last update.

AWS ubuntu18.04で IAM RoleによるCode Commit からのgit cloneには awscliが必要

Posted at

AWS ubuntu18.04で IAM RoleによるCode Commit からのgit cloneには awscliが必要

環境

ubuntu18.04 on AWS EC2

Amazon linuxでは起きない?!

他のプロジェクトではamazon linuxを使っていて、ubuntuでやったのは初めてで気付かなかったので、メモ。※知っている人から見たら低次元の話です。すみません。

まずはgit-configで設定

git config --global credential.helper '!aws --region us-east-1 codecommit credential-helper $@' 
git config --global credential.UseHttpPath true

※リージョンはご自身の使用内容に修正して下さい。

これでhttpsでgit cloneしてもエラーになる!AWS Cliインストールを

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py
sudo pip install awscli

結論から言うとAWS Cliのインストールが必要となります。
無事httpsでgit clone出来るようになりました!

1
0
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
1
0