Skip to content

Resource not accessible by integration when using Github App token #69154

Closed Answered by mike-pisman
mike-pisman asked this question in Actions
Discussion options

You must be logged in to vote

Okay, I figured it out. I tried manually generating a JWT token and then using it to generate app installation token, and managed to trigger a repository. (Guess this is a good way to check the app permissions)

As always, I missed a small detail which caused all the trouble. The actions/create-github-app-token by default only generates a token for the current repository. To generate a token for all repositories it's important to specify owner, i.e. owner: ${{ github.repository_owner }}

    steps:
      - name: Generate a token
        id: generate_token
        uses: actions/create-github-app-token@v1
        with:
          app_id: ${{ secrets.APP_ID }}
          private_key: ${{ secrets…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@mike-pisman
Comment options

Comment options

You must be logged in to vote
2 replies
@hkonala
Comment options

@mike-pisman
Comment options

Answer selected by mike-pisman
Comment options

You must be logged in to vote
2 replies
@abhi-iac
Comment options

@mike-pisman
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working correctly Actions Build, test, and automate your deployment pipeline with world-class CI/CD
5 participants