Bad credentials error

Repository: GitHub - Coin-Catalog/Pennies: Here will lay the pages for the pennies on the Coin catalog site.

I have an action run every time an issue is opened for it to be added to a project. But when it runs I get the following error

Run actions/add-to-project@main
    github-token: ***
Error: Bad credentials

From looking at the documentation of that action the workflow as such should be fine as long as the secret you use exists. What I can’t see is the secret: Is it a valid token with the required scopes, and nothing else (no extra spaces, etc.)?

1 Like

There are not any extra spaces. And the secret is org wide.

Hi @ethan-master-coding
Does your token has with repo , write:org and read:org scopes ?
As mentioned there GitHub - actions/add-to-project: Automate adding issues and pull requests to GitHub projects (beta)

There was no option to give the token perms. The token is from the org and not my user. And the repo does recognize the token.

Then org owner or admin who provided this token has to add these scopes. It’s no chance to make it work without correct scopes.

I am the owner of the org but I did not see the option to.

It is another URL Sign in to GitHub · GitHub
or official doc Creating a personal access token - GitHub Docs

Oh, it needs to be a personal token instead of an org token. Will I need to to change any of the syntax other than needing to change the name of the token? Or for the value of the token the value of my token?

Is yours org Enterprise one?
If you have token on org level you can change scope for existing token

I figured it out thanks @ViacheslavKudinov. And no its a free one.

1 Like