Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing maven package GitHub action is failing #1906

Open
davidgamez opened this issue Oct 25, 2024 · 3 comments · May be fixed by #1921
Open

Publishing maven package GitHub action is failing #1906

davidgamez opened this issue Oct 25, 2024 · 3 comments · May be fixed by #1921
Assignees

Comments

@davidgamez
Copy link
Member

Description

The update-release-assets GitHub action failed in the last 6.0.0 release. It looks like the 1password key was changed and its reference is not invalid.

https://github.com/MobilityData/gtfs-validator/actions/runs/11521874673/job/32076491158

As a recommendation, we should add the 1password reference as a GitHub environment variable to avoid changing the action code when keys are re-generated/updated.

@jcpitre
Copy link
Contributor

jcpitre commented Oct 28, 2024

I believe the entry to use from 1password is:

  • Vault: TECH: Keys & Tokens
  • Entry: GPG Key - Maven/Sonatype

And here are the new values of the variables in publish_assets.yml:

  • MAVEN_GPG_PRIVATE_KEY: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/dkkfywvsr3xq6eyeubq6cldaxi/Private Key"
  • MAVEN_GPG_PASSPHRASE: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/dkkfywvsr3xq6eyeubq6cldaxi/password"

Which are not the same as the ones we have now.

To be confirmed.

@jcpitre
Copy link
Contributor

jcpitre commented Oct 28, 2024

I tried publishing from the command line following this , but I got this error:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:publishMavenJavaPublicationToMavenRepository'.
> Failed to publish publication 'mavenJava' to repository 'maven'
   > Could not PUT 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/org/mobilitydata/gtfs-validator/gtfs-validator-core/6.0.0/gtfs-validator-core-6.0.0.jar'. Received status code 401 from server: Content access is protected by token

It seems sonatype will not accept username/password any more. It will require tokens. See this

@jcpitre jcpitre self-assigned this Oct 28, 2024
@jcpitre
Copy link
Contributor

jcpitre commented Oct 28, 2024

Created a token and used it to do the release. Tested and published. The 6.0.0 jars are now available. See the core jar, the model jar and the main jar.

Still need to modify the release code for next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants