

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 리포지토리 링크 생성
리포지토리 링크 생성

 AWS Command Line Interface (AWS CLI)의 **create-repository-link** 명령을 사용하여 연결과 동기화할 외부 리포지토리 간에 링크를 생성할 수 있습니다.

리포지토리 링크를 생성하려면 먼저 GitHub와 같은 서드 파티 공급자를 통해 외부 리포지토리를 이미 생성해야 합니다.

**리포지토리 링크를 생성하려면**

1. 터미널(Linux, macOS, Unix) 또는 명령 프롬프트(Windows)를 엽니다. AWS CLI 를 사용하여 **create-repository-link** 명령을 실행합니다. 관련 연결의 ARN, 소유자 ID, 리포지토리 이름을 지정합니다.

   ```
   aws codeconnections create-repository-link --connection-arn  arn:aws:codeconnections:us-east-1:account_id:connection/001f5be2-a661-46a4-b96b-4d277cac8b6e --owner-id account_id --repository-name MyRepo 
   ```

1. 이 명령은 다음 출력을 반환합니다.

   ```
   {
       "RepositoryLinkInfo": {
           "ConnectionArn": "arn:aws:codeconnections:us-east-1:account_id:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f",
           "OwnerId": "account_id",
           "ProviderType": "GitHub",
           "RepositoryLinkArn": "arn:aws:codeconnections:us-east-1:account_id:repository-link/be8f2017-b016-4a77-87b4-608054f70e77",
           "RepositoryLinkId": "be8f2017-b016-4a77-87b4-608054f70e77",
           "RepositoryName": "MyRepo",
           "Tags": []
       }
   }
   ```