これなんだ
AWS CodeCommit入門してみました。
この辺とか見ながら
http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html
料金
入門するにあたって一番心配は料金だけ。
http://aws.amazon.com/codecommit/pricing/
5ユーザー、50GB、10000requestまで毎月無料
オーバーしたら$1、追加10Gと2000request追加
CodeCommitの設定
Get started
↓
Repository nameとDescriptionを登録
↓
リポジトリ完成
IAMの設定
こんな感じのコマンド打ってIAMに鍵登録
鍵の部分はお好みで変えてください。
aws iam upload-ssh-public-key --user-name onishi --ssh-public-key-body file://~/.ssh/id_rsa.pub
~/.ssh/config
先ほどのIAMの設定した鍵のSSHPublicKeyIdをUserの部分に入れる
Host git-codecommit.*.amazonaws.com
User your-SSH-key-ID
接続確認
ssh git-codecommit.us-east-1.amazonaws.com
- 失敗
Permission denied (publickey).
- 成功
Warning: Permanently added the RSA host key for IP address '***.***.***.***' to the list of known hosts.
You have successfully authenticated over SSH. You can use Git to interact with AWS CodeCommit. Interactive shells are not supported.Connection to git-codecommit.us-east-1.amazonaws.com closed by remote host.
Connection to git-codecommit.us-east-1.amazonaws.com closed.
gitからPushしてみる
-
gitのremoteを追加する
CodeCommitで作成したリポジトリのSSHを使う
git remote add origin [リポジトリのSSH]
-
gitでcommitまでとりあえずする
echo hogehoge >> index.html && git add . && git commit -m 'first commit'
-
git push
git push origin master
あとは普通にgitを使うだけ
現在予定されている追加機能
- Webhook
- CloudTrailによるログ
- UI追加