공부하기싫어
article thumbnail
Published 2023. 8. 9. 23:52
AWS CodeCommit demo AWS/CI CD

목차

     

    테스트 목적

    • codecommit repository 생성 시 고려해야 할 사항 체크
    • codecommit repository push and pull step by step
    • 보안 및 암호화 기능

     

    1. CodeCommit Repository

    repository 생성

    저장소 생성 후 임시로 쓸 텍스트 파일을 생성해준 후 커밋

     

    commit

     

    확인

    그러면 이렇게 default branch 인 main branch 를 확인할 수 있다

     

    2. Push and Pull

    2.1 https 자격증명 생성

    codecommit repository 를 생성 후 https 를 사용해 push or pull 하려면 credential 이 필요함

    IAM - User - [사용할 유저] - Security Credentials

    https git credentials

     

    generate credentials

    비밀번호를 복사해놓고

     

    2.2 clone and push

    https url 로 클론 프로젝트 진행

    # IAM 에서 생성한 자격증명 id/pass 입력
    $ git clone https://git-codecommit.ap-northeast-2.amazonaws.com/v1/repos/test
    Cloning into 'test'...
    Username for 'https://git-codecommit.ap-northeast-2.amazonaws.com': admin-at-501587125031
    Password for 'https://admin-at-501587125031@git-codecommit.ap-northeast-2.amazonaws.com': 
    remote: Counting objects: 3, done.
    Unpacking objects: 100% (3/3), 208 bytes | 104.00 KiB/s, done.
    $ ls
    test
    $ cd test/
    $ ls
    test.txt
    $ cat test.txt 
    this is test file

     

    파일 수정 후 repository 로 다시 push

    # 파일 수정
    $ vim test.txt 
    $ cat test.txt 
    this is test file
    
    super shy
    
    # codecommit repositroy 로 push
    $ git add .
    $ git commit -m "commit from local laptop"
    [main 5e56f9d] commit from local laptop
     1 file changed, 3 insertions(+), 1 deletion(-)
    $ git push
    # 똑같이 user-id / password 입력

     

    변경 확인

     

     

     

     

     

    참고

    https://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/welcome.html

     

    AWS CodeCommit란 무엇인가요? - AWS CodeCommit

    이 페이지에 작업이 필요하다는 점을 알려 주셔서 감사합니다. 실망시켜 드려 죄송합니다. 잠깐 시간을 내어 설명서를 향상시킬 수 있는 방법에 대해 말씀해 주십시오.

    docs.aws.amazon.com

    https://yeonwoo97.tistory.com/334

     

    [Udemy][day-36,37] Section17 : AWS CI/CD-1

    #AWS Certified Developer Associate 188. AWS CICD - 섹션 소개 별내용 없음 189. AWS의 CICD 소개 AWS CodeCommit - 코드를 저장하는 리포지토리 AWS CodePipeline - 코드에서 Beanstalk 등의 플랫폼까지 이르는 파이프라인 자

    yeonwoo97.tistory.com