MST
MST

Reputation: 179

Github Actions: Checkout@v3 on private repo in org: not found

I am creating a private org and trying to create reusable workflows within my private repositories by checking out one private repo, then running a workflow within it.

I am always met with the same error:

(https://i.sstatic.net/eEymF.png)

Pipeline code:

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]


jobs:
  NET_6_Pipeline:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with: 
          repository: <ORGNAME>/<REPONAME>
          token: ${{ secrets.TOKEN }}
          path: reusable-actions
      - uses: ./reusable-actions/BuildNET.yml@main
        with:
          secrets: inherit

I created the token with quite literally every permission, and placed it in my org secrets (we have paid so can utilize org secrets in private repos)

Pipeline Output

Upvotes: 4

Views: 7554

Answers (1)

MST
MST

Reputation: 179

I was able to resolve this issue:

My problem was that I was using a PAT that I created under my personal account, but had not enabled PAT access in my org.

Solution:

  1. Go to Organization Home Page
  2. Click Personal Access Tokens in the left menu, scroll down to find it under Third-part access
  3. Click settings under that
  4. Allow Fine Grained access tokens
  5. create a new PAT under my profile, and set the Resource Owner as my org

Upvotes: 6

Related Questions