Request packages:write so the automatic token can push the image
Some checks failed
build / container (push) Failing after 5s
Some checks failed
build / container (push) Failing after 5s
The login step reached the registry but was refused: Error response from daemon: Get "https://git.clortox.com/v2/": unauthorized The registry is enabled (an unauthenticated /v2/ returns a proper UNAUTHORIZED registry error) and a personal access token authenticates against it, so the automatic token is what lacks the scope. Gitea's automatic token starts read-only, so the workflow now asks for packages:write. The REGISTRY_TOKEN fallback stays, and is preferred when set.
This commit is contained in:
@@ -42,6 +42,15 @@ env:
|
|||||||
# The default branch: the only one that also moves `latest`.
|
# The default branch: the only one that also moves `latest`.
|
||||||
DEFAULT_BRANCH: master
|
DEFAULT_BRANCH: master
|
||||||
|
|
||||||
|
# Gitea's automatic token starts read-only, and pushing an image needs write
|
||||||
|
# access to packages. Asking for it here means no deployment has to manage a
|
||||||
|
# personal access token; an instance that does not grant package scope to the
|
||||||
|
# automatic token can set a REGISTRY_TOKEN secret instead, which the login step
|
||||||
|
# prefers whenever it is present.
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
container:
|
container:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user