You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generate a personal access token (classic) to access maven reposiotry #129
We do have two private repositories in our organization, let's call them: library and project. The library is hosted in the Maven GitHub repository. The project workflow is using a personal access token for authorization (according to documentation.
Now we want to migrate to actions/create-github-app-token, but I was unable to create a working solution.
.github/workflows/example.yml
jobs:
build:
runs-on: ubuntu-lateststeps:
- name: Checkout codeuses: actions/checkout@v4
- name: Get token from Github Appuses: actions/create-github-app-token@v1id: app-tokenwith:
app-id: ${{ secrets.GET_TOKEN_APP_ID }}private-key: ${{ secrets.GET_TOKEN_APP_PRIVATE_KEY }}owner: ${{ github.repository_owner }}
- name: Set up Mavenuses: actions/setup-java@v4with:
java-version: '17'distribution: 'corretto'cache: 'maven'server-username: MAVEN_USERNAMEserver-password: MAVEN_PASSWORD
- name: Build and Packagerun: | cd project mvn clean packageenv:
MAVEN_USERNAME: ${{ github.actor }}MAVEN_PASSWORD: ${{ steps.app-token.outputs.token }}
I've tried multiple configurations but always end up with the following error:
What I'm guessing is that create-github-app-token doesn't support a personal access token. Could you confirm if this is the case?
That is correct, actions/create-github-app-token creates installation access token (server-to-server tokens). Personal access tokens cannot be created programmatically without user interaction.
Activity
gr2m commentedon Apr 22, 2024
That is correct,
actions/create-github-app-tokencreates installation access token (server-to-server tokens). Personal access tokens cannot be created programmatically without user interaction.The
//looks odd, maybe an argument is missing, like an org name? I'm not familiar with maven I'm afraid