Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What is going on with this article?
@gonza_kato_atsushi

AWS CodeCommit (自分用メモ1)

More than 1 year has passed since last update.
1 IAMでCodeCommitの権限を全て持っているユーザーを作成

・ユーザー名はaws_cli_user
・リージョンはus-east-1
で作成

2 Access Key、Secret Access Keyを保存
3 CodeCommit でリポジトリを作成
4 自分のパソコンに(ローカルに)Gitを入れていること
ターミナル
# ローカルにaws cliを入れる
katoatsushi$ pip install awscli --upgrade --user

# 設定
katoatsushi$ aws configure --profile CodeCommitUser
AWS Access Key ID [None]: ASDFGHJKIUYTRFGHJKUYTGFGH
AWS Secret Access Key [None]: sdfgtyujkj/+tgh/mjyRestdH&^FGHJ
Default region name [None]: us-east-1
Default output format [None]: json

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

次にgit clone でローカルに落とす
そしてpush

ターミナル
katoatsushi$ git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/go-sample-master
Cloning into 'go-sample-master'...
warning: You appear to have cloned an empty repository.

katoatsushi$ cd ~/sample-repo && touch main.go
katoatsushi$ git add .
katoatsushi$ git commit -m"first commit"
katoatsushi$ git push origin master

確認してみると、、、
スクリーンショット 2020-02-23 15.14.30.png

上手くpush できてました。

次はCodeDeploy、CodePipeline、CodeCommitを使った自動デプロイです

0
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
0
Help us understand the problem. What is going on with this article?