ci: switch Maven auth to basic (username/password), not httpHeaders
Publish Maven packages / publish (push) Failing after 27s

Still 401 after granting packages:write — the httpHeaders form from
Gitea's docs is honored by Maven's resolver (dependency reads) but
apparently not reliably by the wagon-http provider maven-deploy-plugin
uploads through, which deployed unauthenticated. Basic auth is
wagon-http's oldest, always-supported path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Zakaria El Orche
2026-08-12 19:53:12 +00:00
co-authored by Claude Sonnet 5
parent 9d19de50cb
commit 3bc5952dc7
+8 -8
View File
@@ -7,18 +7,18 @@
already exports (Gitea Actions' built-in per-job token, scoped to this repo/org — see already exports (Gitea Actions' built-in per-job token, scoped to this repo/org — see
https://docs.gitea.com/usage/packages/maven#configuring-the-package-registry), never https://docs.gitea.com/usage/packages/maven#configuring-the-package-registry), never
written to disk. written to disk.
Basic auth (username/password), not the <httpHeaders> form Gitea's own docs show: that
form is honored by Maven's resolver (used for reading <repositories>) but not reliably
by the wagon-http provider maven-deploy-plugin actually uploads through, which silently
dropped it and deployed unauthenticated (401). Basic auth is wagon-http's oldest,
always-supported path.
--> -->
<servers> <servers>
<server> <server>
<id>gitea</id> <id>gitea</id>
<configuration> <username>Relism</username>
<httpHeaders> <password>${env.GITEA_TOKEN}</password>
<property>
<name>Authorization</name>
<value>token ${env.GITEA_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server> </server>
</servers> </servers>
</settings> </settings>