401 unauthorised when submitting release
My project is completing build, but fails to upload the artifacts to github. I receive the below error:
Error creating GitHub release: Error reading repository 'chummer5a/chummer5a' releases: 401 - Unauthorized
I've refreshed the oauth token and ensured that it has repo rights and what should be sufficient rights to perform the upload. I'm not sure what else can/should be done to resolve this. Project name is Chummer, github appveyor yaml is https://github.com/chummer5a/chummer5a/blob/master/appveyor.yml
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 25 Feb, 2022 04:19 PM
So, if the value of
CHUMMER_OAUTH_TOKEN
variable is marked as "secure" on UI (lock sign is clicked next to it) then you could use it as the following inappveyor.yml
:2 Posted by richard.thomas8... on 26 Feb, 2022 01:05 AM
Okay, I'm now getting
Error creating GitHub release: Provider setting not found or it's value is empty. If secure setting is used please check that value was encrypted (or YAML was exported) while being logged under correct account.
Parameter name: auth_token
Should it not be marked as secure in the yaml when I do this? The value is encrypted.
Support Staff 3 Posted by Feodor Fitsner on 26 Feb, 2022 03:46 AM
On "Environment" tab of project settings put unencrypted (clear text) value of variable and then click "Lock" icon next to it. The variable will be stored in the database in encrypted form and treated as "secure" in builds.
4 Posted by richard.thomas8... on 26 Feb, 2022 06:59 AM
Sorry, that still fails whether or not I use the locked variable. Did something change recently with how the keys are supposed to work? I recall getting emails about it from github that the appveyor token was old so I regenerated it and since then we've had these issues.
Support Staff 5 Posted by Feodor Fitsner on 27 Feb, 2022 03:59 AM
OK, start from putting an encrypted value to appveyor.yml:
to make sure token and deployment works.
6 Posted by richard.thomas8... on 27 Feb, 2022 08:30 AM
Unfortunately same behaviour using the encrypted value directly in the yaml.
Support Staff 7 Posted by Feodor Fitsner on 27 Feb, 2022 06:36 PM
Try calling "List releases" API with curl and your token:
https://docs.github.com/en/rest/guides/getting-started-with-the-res...
https://docs.github.com/en/rest/reference/releases#list-releases
8 Posted by richard.thomas8... on 01 Mar, 2022 12:31 AM
I've tried that; initially got an error so I generated a new token, which
is able to access the releases api. Unfortunately
9 Posted by richard.thomas8... on 01 Mar, 2022 12:31 AM
Unfortunately it still fails. Apologies for double-message.
Support Staff 10 Posted by Feodor Fitsner on 01 Mar, 2022 04:01 AM
OK, make sure you encrypt the token under the same AppVeyor account which uses it.
Feodor Fitsner closed this discussion on 01 May, 2022 09:01 PM.