This message was deleted.
# community-support
s
This message was deleted.
o
I'm getting 'Unprocessable Entity' and 422 status code
it's the same error for a zipped file
e
it might not like "dev" as a version
o
also getting: Could not PUT 'https://maven.pkg.github.com/globisnv/globis-online-plugins/groupName/EGradle/1.0.0/EGradle-1.0.0.zip'. Received status code 422 from server: Unprocessable Entity
v
It does not like the mixed-case artifact id
Use all lowercase and it should work iirc
✅ 1
o
holy shit
where did you find that 😮
now I'm getting unauthorized
thx btw
v
where did you find that 😮
I googled for you the term "github gradle registry 422 unprocessable entity" and the second hit was https://github.com/orgs/community/discussions/26328 where the accepted answer says exactly that. 🙂
🙌 1
now I'm getting unauthorized
then authorize 🙂
You also cannot use the package without authentication, so if this should be a release for the public, GitHub registry is a bad choice anyway
o
im checking into github roles now
thx a lot anyway!!!
👌 1
e
setting up authentication is fairly easy; instead of doing as their documentation states, add
Copy code
repositories {
    maven("<https://maven.pkg.github.com/OWNER/REPO>") {
        name = "GitHubPackages"
        credentials(PasswordCredentials::class)
    }
}
to your Gradle buildscripts and
Copy code
env:
  ORG_GRADLE_PROJECT_GitHubPackagesUsername: ${{ github.actor }}
  ORG_GRADLE_PROJECT_GitHubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}
in your Actions workflows, or
GitHubPackagesUsername=
and
GitHubPackagesPassword=
in your
~/.gradle/gradle.properties
locally, and everything should just work
o
Copy code
credentials(PasswordCredentials::class)
gives me a syntax error
repositories { maven { name = "GitHubPackages" url = myURL credentials(PasswordCredentials::class) } }
e
groovy or kotlin dsl?
o
groovy
remove
::class
or switch to kotlin
o
still unauthorized
v
The
GITHUB_TOKEN
set there probably misses the necessary scope for publishing to the repository
o
I also read that on stackoverflow
so you really need to set scopes
v
yes
o
because I already did that in the workflow
e
for your own use you need a classic personal access token (the new fine-grained tokens don't have package scope yet)
o
ok ty
e
for actions the default token already has read access, and might also have write access by default depending on repository settings. if it doesn't, you just need
Copy code
permissions:
  packages: write
o
yeah ty I have that as well
oh well the authorized issue is solved now because I didnt use gradle-build-action to set env var GITHUB_TOKEN