Hello Gitea forum,
i am currently trying to setup gitea actions with the maven repository described by this tutorial: https://docs.gitea.com/usage/packages/maven. this is my current build.yml file:
name: SwingSupport Building by Gitea Actions
run-name: SwingSupport Building by Gitea Actions
on:
push:
branches:
- main
jobs:
Build SwingSupport:
runs-on: native
steps:
- name: Checkout
run: git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@url/${{ github.repository }}.git
- name: Build and Deploy with Maven
run: |
cd ./${{ github.event.repository.name }}/
mvn -s /var/lib/gitea-runner/maven_settings.xml -Downer=${{ github.repository_owner }} clean deploy -DskipTests
and i am currently struggling with a 401 exception:
Failed to deploy artifacts: Could not transfer artifact :pom:1.0.3 from/to gitea : status code: 401, reason phrase: Unauthorized (401) -> [Help 1]
my settings.xml from /var/lib/gitea-runner/maven_settings.xml
the token is use is generated from a user called runner specifically created for this token.
<settings>
<servers>
<server>
<id>gitea</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>token {the token i generated from the web ui}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
does anybody know how to fix the 401 error? Best regards hanz
PS: If I can provide additional information to complete the picture please let me know.