sbt-github-packages icon indicating copy to clipboard operation
sbt-github-packages copied to clipboard

Without change the SBT file, I get a "java.io.IOException: Error writing to server" exception

Open ghost opened this issue 3 years ago • 3 comments

Hello!

I want to upload the JAR artifact to GitHub packages with the plugin. The plugin definitely did work in the past. However, sometimes I just get this exception: java.io.IOException: Error writing to server

I set the "GIT_TOKEN" environment variable: image

The corresponding build.sbt file looks like this

publishMavenStyle:=true
githubOwner := "<theOwner>"
githubRepository := "<theRepo>"
githubTokenSource := TokenSource.Environment("GITHUB_TOKEN")

When I run "sbt publish", it sometimes works, sometimes I get the mentioned error. Are there logs (maybe in GitHub) where a more detailed error description is available? For example, the GitHub Token is valid, otherwise the upload would have never worked. Also, I need a reliable configuration of the plugin, because we want to use SBT in a pipeline (in Azure).

Thank you for your help! Kind regards, LT

ghost avatar Jan 20 '22 13:01 ghost

I seem to be experiencing a similar. I copied a working configuration from one project to a new project and now I am unable to publish with an HTTP 422 error.

michaelmior avatar Jan 26 '22 17:01 michaelmior

Similiar 422 situation here. This plugin is the best approach, but if you can't diagnose it a workaround is to use mvn deploy:deploy-file.

I've documented how to create a .sbt task that works locally and inside Github Actions https://stevenrskelton.github.io/scala-sbt-publishing-to-github-packages

stevenrskelton avatar Apr 17 '22 19:04 stevenrskelton

Getting the same issue :/

https://github.com/syther-labs/rediculous/runs/7005108072?check_suite_focus=true

Swoorup avatar Jun 22 '22 13:06 Swoorup