1 创建IAM用户
IAM创建admin用户,增加AWSCodeCommitFullAccess权限
2 创建存储库
CodePipeline -> CodeCommit -> 存储库
创建存储库
3 SSH
- window环境
3.1.1 上载SSH公有秘钥
生成SSH秘钥ID
3.1.2 编辑本地 ~/.ssh 目录中名为"config"的 SSH 配置文件
bash
Host git-codecommit.us-east-x.amazonaws.com
User 上一步的秘钥ID
IdentityFile ~/.ssh/Your-Private-Key-File-Name-Here
4 git拉取代码
bash
$ git clone ssh://git-codecommit.us-east-x.amazonaws.com/v1/repos/aws-codepipeline-demo
5 提交代码
bash
$ git add -A
$ git commit -m "Add sample application files"
$ git push