Hi folks,
I have a requirement where I need to deploy a module snapshot to JFrog Artifactory using Github actions. I am not familiar with how the job to deploy would exactly be however, have written this
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn clean package
- name: Publish to JFrog Artifactory
run: mvn deploy
env:
registry: <jfrog artifactory url>
username: ${{ secrets.JFROG_USERNAME }}
password: ${{ secrets.JFROG_PASSWORD }}
GITHUB_TOKEN: "${{ secrets.REPOSITORY_TOKEN }}"
and set JFROG_USERNAME, JFROG_PASSWORD and REPOSITORY_TOKEN as secretes in the repository settings.
When I run the job I get an error:
Failed to deploy artifacts: Could not transfer artifact
authentication failed 401 Unauthorized
Note that am able to use these credentials to login into JFrog account and able to deploy the snapshot manually.
Thanks.