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

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

Open
ghost opened this issue Jan 20, 2022 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 20, 2022

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

@michaelmior
Copy link

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.

@stevenrskelton
Copy link

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

@Swoorup
Copy link

Swoorup commented Jun 22, 2022

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

No branches or pull requests

3 participants