수색…


비고

aws 명령 행 도구git 명령을 사용 하여 로컬 개발 시스템을 설정하여 준비하십시오.

git 명령 줄에 대한 설치 codecommit

AWS Codecommit은 개인 GIT 저장소의 저장소로 사용할 수 있습니다. 설정에는 이미 유효한 AWS 계정이 있다고 가정하고 몇 단계가 필요합니다.

  1. AWS Codecommit에 가입 하십시오 . 현재 us-east-1 지역 만 사용할 수 있습니다.
  2. 리포지토리에 액세스 할 수있는 IAM 사용자 를 만듭니다 (예 : codecommit-user
  3. 이 사용자에게 권한 역할 AWSCodeCommitFullAccess 첨부
  4. 이 사용자에 대한 새 Access Key 를 만들고 key idsecret code
  5. 이제 로컬 시스템에 AWS Configuration 프로파일 을 작성하십시오.
$ aws configure --profile codecommit-user

다음 단계에서는 aws 명령을 git 에 신임 도우미로 다음 명령을 사용하여 연관시킵니다.

$ git config --global credential.helper \
    '!aws --profile codecommit-user codecommit credential-helper $@'
$ git config --global credential.UseHttpPath true

이 설정은 나중에 확인하거나 수정할 수 있습니다.

$ git config --global --edit

섹션에 유의해야합니다.

[credential]
    helper = !aws --profile codecommit-user codecommit credential-helper $@
    UseHttpPath = true

이제 보통 때처럼 명령 행에서 git을 사용할 수 있습니다.

소스 트리를 AWS 코드 캐트와 함께 사용하십시오.

Atlassian SourceTree 는 Mac 및 Windows에서 소스 코드 저장소를 관리하기위한 시각적 도구입니다. 이것은 Codecommit과 함께 원격 저장소로 사용할 수 있지만 codecommit으로 연결할 수 있도록 SourceTree의 로컬 저장소에 추가 구성 옵션을 추가해야합니다.

먼저 로컬 git에 대해 codecommit을 설정하십시오.

codecommit 으로 푸시 할 로컬 git 저장소가 있다고 가정하면 다음 단계를 따르십시오.

  1. 웹 콘솔을 사용하여 AWS Codecommit에 로그인하십시오.
  2. 새 저장소 만들기 (예 : my-project
  3. HTTPS URL을 복사하면 https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my-project 와 같이 보입니다.
  4. 이제 SourceTree에서 패널 Settings / Remote를 엽니 다.
  5. 이름과 함께 새 리모컨 추가 : origin 및 URL / 경로 : 이전에 복사 한 링크
  6. 마지막으로 구성 파일 편집 옵션을 열고 다음 스 니펫을 추가하십시오.
[credential]
    helper = /usr/local/bin/aws --profile codecommit-user codecommit credential-helper $@
    UseHttpPath = true

여기에 이미지 설명을 입력하십시오.

설정 파일을 저장 한 후에는 다음과 같이 보일 것입니다 :

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "origin"]
    url = https://git-codecommit.us-east-1.amazonaws.com/v1/repos/digitaloffice.nu
    fetch = +refs/heads/*:refs/remotes/origin/*
[credential]
    helper = /usr/local/bin/aws --profile codecommit-user codecommit credential-helper $@
    UseHttpPath = true

참고 :이 설정은 OS-X 설정을 기반으로합니다. aws (이 경우에는 /usr/local/bin/aws 에 대한 경로를 특별히 /usr/local/bin/aws 다른 Unixes 또는 Windows 구성에서는 확실히 다를 수 있습니다.



Modified text is an extract of the original Stack Overflow Documentation
아래 라이선스 CC BY-SA 3.0
와 제휴하지 않음 Stack Overflow