dune-release
dune-release copied to clipboard
Improve handling of bad credentials erros by suggesting to generate a new token.
Hello. I get the following error:
14:40 ~/trash/lambdapi (release) dune-release publish distrib
[-] Publishing distribution
[-] Publishing to github
[-] The tag 2.1.0 is present and uptodate on the remote: skipping the tag push
[?] Create release 2.1.0 on https://github.com/Deducteam/lambdapi.git? [Y/n]
Y
[-] Creating release 2.1.0 on https://github.com/Deducteam/lambdapi.git via github's API
dune-release: [ERROR] Github API error:
Could not retrieve release ID from response
Github API returned: "Bad credentials"
See the documentation "https://docs.github.com/rest" that might help you resolve this error.
14:46 ~/trash/lambdapi (release) dune-release --version
1.5.2
14:48 ~/trash/lambdapi (release) git remote -v
origin [email protected]:fblanqui/lambdapi.git (fetch)
origin [email protected]:fblanqui/lambdapi.git (push)
What is strange is that it did work on December 13, and that I am never asked for a password or a token. I don't know what to do. I hope you can help me.
Thanks for reporting this!
If you're not asked for a token, it must mean that you already set one at some point in the past. You can try looking for it in ~/.config/dune/github.token
.
This looks like your github token might be wrong somehow, either the file was compromised (this has happened in the past, some version of dune-release must have created corrupted token files) or the token expired. Could you run this in verbose mode (i.e. with -vvv
) and paste the output here to get a bit more information? Make sure to replace your token in the ouput if it ever gets printed there.
You could try deleting your token file in ~/.config/dune/github.token
to get prompted for a fresh github token and see if that fixes the issue.
Please let us know if any of the above fixed the issue!
Indeed, I had a ~/.config/dune/github.token file which expired. It would be nice to add this in your README.md file that, in case of problems, one can try to remove ~/.config/dune/github.token. Thank you for your help.
Yeah the documentation needs to improve here along with the tooling, i.e. using dune-release config
for this rather than removing the file by hand. It would also be nice to detect this specific kind of error and suggest that solution directly in the tool's output.
Happy to have been of help here, I'm keeping this open until we improve the handling of this kind of errors!
If you're not asked for a token, it must mean that you already set one at some point in the past.
This just happened to me too. Quite confusing! It should be clearer in the readme/documentation where to find the token. Note that public_repo
is sufficient for permissions.
I can confirm this was a very confusing error to get! The only hicup on the road, though, the rest was smooth. :)