2017-01-24 1 views

답변

0

AWS와 함께 사용되는 GitHub 계정이 나옵니다. CodePipeline은 CodePipeline에서 사용할 수 있도록 전체 관리자 액세스 권한이 필요합니다.

+0

'''토큰은 다음과 GitHub의 범위가 구성되어 있는지 확인합니다 : http://docs.aws.amazon.com/codepipeline/latest/userguide에서 repo_hook 및 repo''' : 관리자를 /troubleshooting.html#troubleshooting-gs2 – RandomQuestion

1

또는 CloudFormation 템플릿의 공개 Repo 읽기 만있는 개인 인증 토큰을 제공 할 수 있습니다.

는 GitHub의에서

설치 및 우리는을 통해 전달 될 수 CloudFormation 매개 변수에 액세스 할 수! 참조를 사용하는 CodePipeline

대한 CloudFormation에서
### Builds CI/CD pipeline Stages and Actions 
Pipeline: 
Type: AWS::CodePipeline::Pipeline 
Properties: 
    ArtifactStore: 
    Type: S3 
    Location: !Join ["-", ["byu", !Ref "AWS::AccountId", !Ref "AWS::Region", "code-build-artifacts" ]] 
    #RoleArn: !Ref CodePipelineServiceRole 
    RoleArn: !Join ["",["arn:aws:iam::", !Ref "AWS::AccountId", ":role/CodePipelineServiceRole"]] 
    Stages: 
    ### Defines Source repository via params 
    - Name: !Join ["-",["Source", !Ref GitHubBranch, !Ref GitHubRepository]] 
    Actions: 
    - InputArtifacts: [] 
     Name: Source 
     ActionTypeId: 
     Category: Source 
     Owner: ThirdParty 
     Version: '1' 
     Provider: GitHub 
     OutputArtifacts: 
     - Name: MyApp 
     Configuration: 
     Owner: !Ref GitHubUser 
     Repo: !Ref GitHubRepository 
     Branch: !Ref GitHubBranch 
     OAuthToken: !Ref GitHubToken 
     RunOrder: 1 

을 개인 인증 토큰 그런 enter image description here enter image description here

복사 cli - 코드에서 액세스 키를 사용하지 못하게합니다. O

Parameters: 
    GitHubUser: 
    Type: String 
    Description: GitHub user name or organization name - whichever prepends the repo name 
    GitHubRepository: 
    Type: String 
    Description: GitHub repository name (not url) 
    GitHubBranch: 
    Type: String 
    Description: GitHub repository branch 
    GitHubToken: 
    Type: String 
    Description: GitHub personal-access-token - see 

https://help.github.com/articles/creating-an-access-token-for-command-line-use/

GitHub 사용자 이름은 사용자 이름 또는 조직 이름 중 어느 것이 든 내 repo 이름 앞에 표시됩니다.

Full example

관련 문제