nixpkgs-review: GitHub token seems to be required now, with bad error message
When I try to run nix-review now I get an HTTP 401 Unauthorized error. I’m not giving nix-review a token, and it should only be accessing public data by default, so I don’t know why it’s failing. The error is rather obtuse as it’s just a very long stack trace but it’s definitely coming from the call to the GitHub API.
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 1
- Comments: 17 (8 by maintainers)
Since 3.0.0, #435 makes regular
nixpkgs-review pr(without posting the result) always need a GitHub token to work, or it fails with a unclear error message complaining about “not a working tree” following by a 403 Forbidden error.IIUC, it’s because we now use
--eval=ofborgas default. Could we fallback to local eval when no token is set? Or, at least fail-fast and mention that a token required in this case?Maybe, I should just removing hub/gh token parsing.
Yes I do. I’m rather surprised that nixpkgs-review would be reading .config/hub.
Do you have by chance an out-of-date token in
cat $HOME/.config/hub?