Open AndreMikulec opened 4 days ago
----
Status code 401: Unauthorized
Hi Mauro,
Please try to go to
https://ci.appveyor.com/account,
remove GitHub authorization
and
re-add this again.
Let us know if this helps.
Ilya.
Status code 401: Unauthorized
Mauro Sampietro
May 16, 2017 @ 05:20 AM
https://help.appveyor.com/discussions/questions/3935-status-code-401-unauthorized
https://ci.appveyor.com/authorizations
AppVeyor is authorized to act on behalf of
AndreMikulec GitHub account with
admin:repo_hook,
read:org,
repo:status
scope.
Don't see org resources?
Ensure organization access
postgres-plr
Read about third-party access.
https://docs.github.com/en/organizations/managing-oauth-access-to-your-organizations-data/about-oauth-app-access-restrictions
https://github.com/settings/connections/applications/01881570529737c25f97
is granted to AppVeyor CI application.
----
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 in appveyor.yml:
auth_token: ${CHUMMER_OAUTH_TOKEN}
OK, make sure you encrypt the token
under the same AppVeyor account which uses it.
401 unauthorised when submitting release
richard.thomas86
Feb 25, 2022 @ 03:43 AM
https://help.appveyor.com/discussions/problems/31535-401-unauthorised-when-submitting-release
----
----
(NOTHING WAS FOUND THERE IN EARLY OCT 2024)
https://github.com/settings/tokens
PAT_OCT2024__repostatus__repo_deployment__public_repo
ghp_<omitted>
AppVeyor (Account -> Encrypt YAML).
p/5gj6Qtfk4BKm9EBhiDw0r4UkHKtRyH5mIOsQs2QzI128Vul9mjTgT/WM8cnNa6
Example usage in appveyor.yml
environment:
my_variable:
secure: p/5gj6Qtfk4BKm9EBhiDw0r4UkHKtRyH5mIOsQs2QzI128Vul9mjTgT/WM8cnNa6
Authenticating with a personal access token
THAT WORKS
https://github.com/AndreMikulec/appveyortest4/commit/22dfc92c97fb104f5058f29b8a4b959e78bbbabe
https://ci.appveyor.com/project/AndreMikulec/appveyortest4/builds/50729519
https://github.com/AndreMikulec/appveyortest4/releases/tag/RELTEST
---
ANOTHER USAGE (OFFTOPIC)
Personal access tokens (classic) function
like ordinary OAuth access tokens.
They can be used instead of a password for Git over HTTPS,
or can be used to authenticate to the API over
Basic Authentication.
https://github.com/settings/tokens
Using basic authentication
Authenticating with a personal access token
Authenticating to the REST API
https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28#basic-authentication
----
----
Dave,
This works . . .
https://github.com/AndreMikulec/appveyortest4/commit/22dfc92c97fb104f5058f29b8a4b959e78bbbabe
https://ci.appveyor.com/project/AndreMikulec/appveyortest4/builds/50729519
https://github.com/AndreMikulec/appveyortest4/releases/tag/RELTEST
The error exists
Error creating GitHub release:
Error reading repository 'postgres-plr/plr' releases:
401 - Unauthorized
To try to solve the error do the following:
1.
In
https://github.com/settings/tokens
i. Make sure that a classic PAT is there (and in my case NOTHING was there)
ii. Make sure that a classic PAT is there and not expired
If neither i. nor ii. is not true then go to (2.)
2.
from
https://github.com/settings/tokens
create a new classic token
(I named mine: PAT_OCT2024__repostatus__repo_deployment__public_repo)
with
i. repo:status,
ii. repo_deployment, and
iii. public_repo
3.
from (logged in)
https://ci.appveyor.com/tools/encrypt
encrypt that <ghp_ . . .>
and save that encryped value
4.
from
https://github.com/postgres-plr/plr/blob/master/appveyor.yml
at the bottom at "secure:"
i. after "secure: " place in the new encripted value
ii. commit with a message and push (and this will try to build)
From: ANDRE
Sent: Thursday, October 3, 2024 7:07 PM
To: Dave Cramer <davecramer@gmail.com>
Cc: devrim@gunduz.org <devrim@gunduz.org>; myon@debian.org <myon@debian.org>
Subject: Fw: github.com/postgres-plr/plr - appveyor.yml - 401 Unauthorized when releasing to GitHub
Dave,
This is not a PLR release.
This works . . .
https://github.com/AndreMikulec/appveyortest4/commit/22dfc92c97fb104f5058f29b8a4b959e78bbbabe
https://ci.appveyor.com/project/AndreMikulec/appveyortest4/builds/50729519
https://github.com/AndreMikulec/appveyortest4/releases/tag/RELTEST
The error exists
Error creating GitHub release:
Error reading repository 'postgres-plr/plr' releases: 401 - Unauthorized
To try to solve the error do the following:
1.
In
https://github.com/settings/tokens
i. Make sure that a classic PAT is there (and in my case NOTHING was there)
ii. Make sure that a classic PAT is there and not expired
If neither i. nor ii. is not true then go to (2.)
If either i. or ii. is true, try to create a new classic PAT. Go to (2.)
2.
from
https://github.com/settings/tokens
create a new classic token
(I named mine: PAT_OCT2024__repostatus__repo_deployment__public_repo)
with
i. repo:status,
ii. repo_deployment, and
iii. public_repo
and save that token
3.
from (logged in)
https://ci.appveyor.com/tools/encrypt
encrypt that token <ghp_ . . .>
and save that encryped value
4.
from
https://github.com/postgres-plr/plr/blob/master/appveyor.yml
at the bottom at "secure:"
i. after "secure: " place in the new encrypted value
ii. commit with a message and push (and this will try to build)
(for Above) technology implementation URLs
GitHub authentication token (auth_token)
- OAuth token used for authentication against GitHub API.
You can generate Personal API access token at
https://github.com/settings/tokens.
Minimal token scope is
repo or public_repo to release on private or public repositories respectively.
The permissions
repo:status, repo_deployment
are necessary for successful deployment of artifacts to GitHub.
Be sure to encrypt your token using “Encrypt configuration data” page
in AppVeyor (Account → Encrypt YAML).
https://www.appveyor.com/docs/deployment/github/
Creating a personal access token (classic)
Managing your personal access tokens
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens