Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Resource not accessible by personal access token" Not able to understand the issue. #60

Open
gaurav-cointab opened this issue Jun 15, 2023 · 1 comment

Comments

@gaurav-cointab
Copy link

Hi Team,

This is the setup.

main.yml
name: 'PR Tasks Completed Check'
on:
pull_request:

jobs:
task-check:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
repo-token: ${{ secrets.ACCESS_TOKEN }}

This ACCESS_TOKEN is my Personal Access Token generated to access my organization's private repos.
Repository access: This token has access to all repositories owned by the organization.
Organization permissions: This token does not have any organization permissions.
Repository permissions: Read access to code and metadata

This ACCESS_TOKEN is saved in my Organization's Secrets, and has access to all the repos inside my organization.
ACCESS_TOKEN: Available to all repositories

I am getting this:

Set up job

  • Current runner version: '2.304.0'
  • Operating System
  • Runner Image
  • Runner Image Provisioner
  • GITHUB_TOKEN Permissions
  • Secret source: Actions
  • Prepare workflow directory
  • Prepare all required actions
  • Getting action download info
  • Download action repository 'kentaro-m/[email protected]' (SHA:2ddb65fdd5577bae4a8e82e0564e459677aec893)
  • Complete job name: task-check

Run kentaro-m/[email protected]
with:
repo-token: ***
Error: Resource not accessible by personal access token

So I am unable to understand what error I have made.

Please help me understand the issue.

@ranadeepsingh
Copy link

You can fix it by going to your Repo's settings -> Actions -> General -> Workflow permissions -> Allow "Read and write permissions"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants