Files
Flash5/.gitea/maven-settings.xml
T
Zakaria El OrcheandClaude Sonnet 5 3bc5952dc7
Publish Maven packages / publish (push) Failing after 27s
ci: switch Maven auth to basic (username/password), not httpHeaders
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>
2026-08-12 19:53:12 +00:00

25 lines
1.2 KiB
XML

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!--
Used only by .gitea/workflows/publish-maven.yml (mvn -s .gitea/maven-settings.xml deploy).
Not used for local builds. The token is read from the GITEA_TOKEN env var the workflow
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
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>
<server>
<id>gitea</id>
<username>Relism</username>
<password>${env.GITEA_TOKEN}</password>
</server>
</servers>
</settings>