Gradle publish returns HTTP 403 even after package is uploaded

I am using personal token (SSO enabled)  with package permissions to publish package to GitHub repo owned by organization. 

I see package is published but I see HTTP 403 error. Running with stacktrace or debug options also don’t provide much info. 

* What went wrong:

Execution failed for task ‘:publishMavenPublicationToGithubRepository’.

> Failed to publish publication ‘maven’ to repository ‘Github’

   > Could not PUT ‘https://maven.pkg.github.com/X/gradle-plugins/com/X/A/B/1.0.10/B-1.0.10.jar’. Received status code 403 from server: Forbidden

Please advise. 

1 Like

Did you modify the version number?

Github packages 403 forbidden error is thrown when the version number of the package is already on Github

@sandip-bharati-tfs  Facing the same error. In my case, my upload is the first release of the package. 

This might be related to the fact that I am uploading to orgs private repo. If I try to upload to my own personal repo everything works correctly. 

Same here :frowning: can’t publish