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

Unauthorized #5

Open
himberjack opened this issue Jan 8, 2020 · 6 comments
Open

Unauthorized #5

himberjack opened this issue Jan 8, 2020 · 6 comments

Comments

@himberjack
Copy link

We are getting:
Successfully installed jaro_winkler-1.5.4
Successfully installed parallel-1.19.1
Successfully installed ast-2.4.0
Successfully installed parser-2.7.0.1
Successfully installed rainbow-3.0.0
Successfully installed ruby-progressbar-1.10.1
Successfully installed unicode-display_width-1.6.0
Successfully installed rubocop-0.79.0
8 gems installed
/action/lib/index.rb:39:in create_check': Unauthorized (RuntimeError) from /action/lib/index.rb:119:in run'
from /action/lib/index.rb:134:in `

'
##[error]Docker run failed with exit code 1

@jotolo
Copy link

jotolo commented Jan 8, 2020

Did you set GITHUB_TOKEN? You can check #3

- name: Rubocop checks
  uses: gimenete/[email protected]
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@himberjack
Copy link
Author

Working. Thanks

@IanVaughan
Copy link

Cheers that's the solution!

But the example doesn't include that text on here :https://github.com/marketplace/actions/rubocop-checks shows:
Screenshot 2020-04-15 at 22 40 05
Maybe can that be updated so future me doesnt make the same mistake!

@jaymzh
Copy link

jaymzh commented Jun 7, 2020

I had the same problem and added GITHUB_TOKEN which fixed it for my own PRs, but PRs from contributors still get unauthroized...

@hardyoyo
Copy link

FYI, it looks like GitHub forces the permissions on GITHUB_TOKEN for PRs from forked repositories to "read" which renders this action, and any similar action, unable to function. If you can swing it, just work on your main repository and submit PRs from branches on it. I know that's not great for most open source projects, which rely on public forks. Let GitHub know, if you're not happy with the situation, though I'm sure they have their reasons.

@jaymzh
Copy link

jaymzh commented Jul 31, 2021

My understanding is they had fixed that but I could be wrong...

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

6 participants
@IanVaughan @hardyoyo @jaymzh @himberjack @jotolo and others