LoginSignup
2
1

More than 1 year has passed since last update.

CodeCommit導入手順

Posted at

CodeCommit導入手順

CodeCommitを新規プロジェクトで使うことになったので導入手順を備忘録メモ
AWSコンソールからCodeCommitを検索

目的

  1. 新規リポジトリ作成
  2. 認証設定

新規リポジトリ作成

  1. 名前・説明を入力して、作成をクリック
    _2021-06-02_12.56.21.png

  2. 作成後、リポジトリ一覧表示
    _2021-06-02_12.57.34.png

認証設定

SSH用のキー生成

入力内容は各々入力、passphraseは今回省略

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/takashimorita/.ssh/id_rsa): xxx_id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in xxx_id_rsa.
Your public key has been saved in xxx_id_rsa.pub.
The key fingerprint is:

ユーザー設定

IAMよりユーザーを選択

認証情報タブを選択、SSHパブリックキーのアップロード
_2021-06-02_14.33.13.png

アクセスキーが発行される
_2021-06-02_14.40.59.png

MacにSSHの設定を追加

$ vi ~/.ssh/config

Host git-codecommit.*.amazonaws.com
    User XXXXXX # SSHキーID
    IdentityFile /Users/takashimorita/.ssh/xxx_id_rsa # 作成したプライベートキーパス

Git Clone

$ git clone ssh://git-codecommit.ap-southeast-1.amazonaws.com/v1/repos/[リポジトリ名]
Cloning into '[リポジトリ名]'...
The authenticity of host 'git-codecommit.ap-southeast-1.amazonaws.com (54.240.226.221)' can't be established.
RSA key fingerprint is SHA256:ZIsVa7OVzxrTIf+Rk4UbhPv6Es22mSB3uTBojfPXIno.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git-codecommit.ap-southeast-1.amazonaws.com,54.240.226.221' (RSA) to the list of known hosts.
Counting objects: 3, done.
Receiving objects: 100% (3/3), done.

いいね!と思ったら LGTM お願いします :clap::clap::clap:

【PR】週末ハッカソンというイベントやってます! → https://weekend-hackathon.toyscreation.jp/about/

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