2017-01-24 4 views
0

私は、AWS CodeBuildがGitHubリポジトリに依存するための読み取り専用アクセス権しか必要としないことに気付きました。 AWS CodePipelineでは、実質的なエラーはありませんでした。代わりに、リポジトリは表示されません。CodePipelineがリポジトリと連携するために必要なGitHub権限は何ですか?

CodePipelineはGitHubリポジトリと連携するためにどのような権限が必要ですか?

答えて

0

AWTで使用されているGitHubアカウントが表示されます。CodePipelineは、CodePipelineで使用できるように完全な管理アクセス権が必要です。

+0

'' 'トークンは、以下のGitHubのスコープを持つように構成されていることを確認します。admin:http://docs.aws.amazon.com/codepipeline/latest/userguideからrepo_hookとrepo''' /troubleshooting.html#troubleshooting-gs2 – RandomQuestion

1

また、CloudFormationテンプレートでパブリックリポジトリを読み取るだけの個人認証トークンを提供することもできます。その後CodePipeline

### 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 

のためのあなたのCloudFormationでは私たちは、経由で渡すことができるCloudFormationのパラメータにアクセスするには!参考に使用しているGitHubの中

セットアップおよび個人認証トークン をコピー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のユーザー名は、ユーザー名か組織名のいずれかで、レポ名の前に表示されます。

Full example

関連する問題