We have problems publishing GitHub packages for our internal libraries when we switch to GitHub. Our projects are based on Maven. When publishing to GitHub packages we get the following error:
[WARNING] Failed to upload checksum com/avides/packages-example/0.2.1/packages-example-0.2.1.war.md5: Failed to transfer file https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/0.2.1/packages-example-0.2.1.war.md5 with status code 400 [INFO] Uploaded to github: https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/0.2.1/packages-example-0.2.1.war (5.4 MB at 3.4 MB/s) [INFO] Uploading to github: https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/0.2.1/packages-example-0.2.1.pom [WARNING] Failed to upload checksum com/avides/packages-example/0.2.1/packages-example-0.2.1.pom.md5: Failed to transfer file https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/0.2.1/packages-example-0.2.1.pom.md5 with status code 400 [INFO] Uploaded to github: https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/0.2.1/packages-example-0.2.1.pom (3.1 kB at 3.4 kB/s) [INFO] Downloading from github: https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/maven-metadata.xml [INFO] Uploading to github: https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/maven-metadata.xml [WARNING] Failed to upload checksum com/avides/packages-example/maven-metadata.xml.sha1: Failed to transfer file https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/maven-metadata.xml.sha1 with status code 400 [INFO] Uploaded to github: https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/maven-metadata.xml (0 B at 0 B/s) [INFO] Uploading to github: https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/0.2.1/packages-example-0.2.1-sources.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.587 s [INFO] Finished at: 2019-11-27T08:28:34Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project packages-example: Failed to deploy artifacts: Could not transfer artifact com.avides:packages-example:jar:sources:0.2.1 from/to github (https://maven.pkg.github.com/avides/packages-example-for-support): Failed to transfer file https://maven.pkg.github.com/avides/packages-example-for-support/com/avides/packages-example/0.2.1/packages-example-0.2.1-sources.jar with status code 400 -> [Help 1]
Some files that are needed are not uploaded. But some will be published anyway. The problem only occurs after the initial version of GitHub Packages has been published. All other publications are buggy.
We have created the following project as an example: https://github.com/avides/packages-example-for-support
We have used the following GitHub Actions workflow:
name: release on: push: branches: - master jobs: release: runs-on: ubuntu-latest steps: - name: setup-java uses: actions/setup-java@v1 with: java-version: 11 - name: setup-maven-settings uses: s4u/maven-settings-action@v1 with: servers: '[{"id": "github", "username": "x-access-token", "password": "${GITHUB_TOKEN}"}]' - name: checkout uses: actions/checkout@v1 - name: deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: mvn deploy
In the executed actions you can see that initially everything worked fine and no further deploy process worked afterwards.
Solved! Solved! Go to Solution.
Please turn off the wagon http pool for maven deploy, command as below, it works on my end. :)
mvn -B -e -Dmaven.wagon.http.pool=false clean deploy
Please refer to the ticket for more details.