aws codecommit 代码托管服务使用
1.在aws 的IAM 创建用户https://s3.运维网.com/wyfs02/M02/8E/DA/wKiom1jMzc-TRMWsAACYXbf-m3o476.png2.为用户增加codecommitfullaccess的权限
https://s5.运维网.com/wyfs02/M02/8E/D7/wKioL1jMzejxlJrRAAD1KEG9CSM802.png
3.将机器的ssh公钥添加到用户的安全证书
https://s4.运维网.com/wyfs02/M00/8E/DA/wKiom1jMzg6B_xTHAABxHOy3PH8662.png
这里需要把ssh的密钥id记录一下。克隆代码的时候需要
4.创建codecommit仓库
https://s4.运维网.com/wyfs02/M01/8E/DA/wKiom1jMzlLhyrCZAABuENrN30U335.png
5.使用ssh密钥id 验证 代码仓库是否可连接
# ssh ssh密钥id@git-codecommit.us-east-2.amazonaws.com
The authenticity of host 'git-codecommit.us-east-2.amazonaws.com (52.95.20.120)' can't be established.
RSA key fingerprint is a9:6d:03:ed:08:42:21:be:06:e1:e0:2a:d1:75:31:5e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git-codecommit.us-east-2.amazonaws.com,52.95.20.120' (RSA) 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-2.amazonaws.com closed by remote host.
Connection to git-codecommit.us-east-2.amazonaws.com closed. 6.克隆代码到本地
# git clone ssh://ssh密钥id@git-codecommit.us-east-2.amazonaws.com/v1/repos/pngtreetest
Initialized empty Git repository in /root/test/.git/ 7.git 的一些常用操作
git add./
git commit -m “test”
git push origin master
页:
[1]