notification-controller: failed to initialize provider, error: failed creating Gitea client: 403 Forbidden

Since Gitea upgrade from v1.19 to v1.20 i get this error. πŸ˜•

failed to initialize provider, error: failed creating Gitea client: 403 Forbidden

https://github.com/fluxcd/notification-controller/blob/b80c2c4060f62af40c06fe2f6f3bef295ee56e43/internal/notifier/gitea.go#L69

I know they changed the api key scopes^1, but the key still has repo write scope. My current key was created on v1.19.x with repo scope. It had these scopes:

  • repo
  • repo:status
  • read:package

It’s now converted to these scopes:

  • read:package
  • write:repository

Gitea log message:

2023/07/21 06:48:51 ...eb/routing/logger.go:102:func1() [I] router: completed GET /api/v1/version for a.b.c.d:0, 403 Forbidden in 58.3ms @ v1/api.go:242(v1.tokenRequiresScopes)

Please let me know how to debug this futher. Are there any option to pass additional debug messages?

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

it seems misc is no longer necessary since v1.20.2

https://github.com/go-gitea/gitea/issues/26035

yes, I’ve added read:packages to allow flux fetching docker / oci stuff from Gitea πŸ˜‰

ok, will extend the issue description tomorrow