Search code examples
gitgithubgoogle-kubernetes-enginegoogle-container-registry

Use container engine container registry build triggers for organizations


We have a problem using Container engine container registry build triggers since its impossible to get the repositories from the organization in the import view when importing from github.

Example (the actual repositories removed but they are my personal):

enter image description here

Repositories i contribute to (but i am owner to them according to github since i created the organization):

enter image description here

The organizations repositories are nowhere to be seen and i have gone through the settings several times in github but i might be missing something?


Solution

  • Before you can see the organization repositories in Container Registry, you need to grant Google Cloud Platform access to your organisations within github if you have the authorisation to do this.

    1) Login into github and navigate to 'settings'.

    2) Click on 'Applications' in the side menu.

    3) Click on the 'Authorized OAuth Apps' tab.

    4) There should be an entry for 'Google Cloud Platform', click on it.

    5) You will now be able to see a list of your organisations. Click on 'Grant' to the right of the organisation name to grant access to Google Cloud Platform.

    6) It's a good idea to log out of your Google Cloud Platform project then back in at this point. This will ensure you are asked to re-authorise your github account when when building a Build Trigger or adding a source repository.

    Now when you select 'GitHub' as the source when you add a Build Trigger, and after you re-authenticate to you github account, you should be able to see the organisation listed, along with the standard repositories.