Monday, May 15, 2017

AWS CodeCommit

如何在windows安装aws codecommit
http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-windows.html?icmpid=docs_acc_console_connect#setting-up-https-windows-install-git

主要分为
1. 创建IAM用户gcen作为git的credential,权限加入
   AWSCodeCommitFullAccess, IAMSelfManageServiceSpecificCredentials, IAMReadOnlyAccess并且获得Access Key ID和Secret Access Key相当于git访问密码
2. 安装git,注意不能勾选Git Credential Manager utility,它与CodeCommit不兼容,否则会有     403错误
3. 安装aws cli,最简单是下载MSI安装包或者python的pip安装。安装完毕后,输入aws configure输入Access Key ID和Secret Access Key,地区与CodeCommit上的repository地区保持一致us-east-1(从CodeCommit可得到),否则会有403错误。
4. 本地文件夹git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repos/demo demo同时更改git显示的用户名和邮箱。git https可以在IAM产生username和password绕过SSH

git config --global user.name "Gary"
git config --global user.email "gary@gmail.com"


ref:
codecommit的git命令

No comments:

Post a Comment