jutzig / github-release-plugin

uses the github release api to upload files
69 stars 24 forks source link

Unable to upload asset #18

Closed ghost closed 8 years ago

ghost commented 8 years ago

I'm trying to run the release (on a SNAPSHOT, because I'm testing before doing an actual release):

mvn github-release:release

The release is created on the github project but when uploading the asset, the build fail after a long time with the error below:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyProject 2.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- github-release-plugin:1.1.1:release (default-cli) @ MyProject ---
[INFO] Creating release 2.2-SNAPSHOT
[INFO] Processing asset /home/me/forge/my-project/target/MyProject-2.2-SNAPSHOT.war
[INFO]   Upload asset
[ERROR] 
java.io.IOException: {"message":"Error uploading to https://github-cloud.s3.amazonaws.com: 403","request_id":"5C58F988:4D5B:1988F9C:570615A8"}
    at org.kohsuke.github.Requester.handleApiError(Requester.java:367)
    at org.kohsuke.github.Requester._to(Requester.java:202)
    at org.kohsuke.github.Requester.to(Requester.java:154)
    at org.kohsuke.github.GHRelease.uploadAsset(GHRelease.java:182)
    at de.jutzig.github.release.plugin.UploadMojo.uploadAsset(UploadMojo.java:219)
    at de.jutzig.github.release.plugin.UploadMojo.execute(UploadMojo.java:180)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.io.IOException: Server returned HTTP response code: 502 for URL: https://uploads.github.com/repos/numero-six/MyProject/releases/2969982/assets?name=MyProject-2.2-SNAPSHOT.war
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at org.kohsuke.github.Requester.parse(Requester.java:323)
    at org.kohsuke.github.Requester._to(Requester.java:200)
    ... 25 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11:25 min
[INFO] Finished at: 2016-04-07T10:20:35+02:00
[INFO] Final Memory: 139M/345M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal de.jutzig:github-release-plugin:1.1.1:release (default-cli) on project MyProject: Failed to upload assets: {"message":"Error uploading to https://github-cloud.s3.amazonaws.com: 403","request_id":"5C58F988:4D5B:1988F9C:570615A8"}: Server returned HTTP response code: 502 for URL: https://uploads.github.com/repos/numero-six/MyProject/releases/2999862/assets?name=MyProject-2.2-SNAPSHOT.war -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I've tried several times on different days but the result is always the same. I would be happy to spend time on a PR if someone know where does this come from.

Thanks.

jutzig commented 8 years ago

I've seen this a few times before, usually a temporary issue on the github side. Please try again tomorrow or so

ghost commented 8 years ago

Actually, I'm trying since last week :disappointed:.

jutzig commented 8 years ago

I just tried a snapshot release: https://github.com/jutzig/github-release-plugin/releases/tag/1.1.2-SNAPSHOT

Works fine for me. The error code 502 also sounds like a server problem on github side. Maybe the issue is local to whichever server you are directed to. Sorry I don't see what I could do to help...

ghost commented 8 years ago

Worked today (took weeks to resolve...). Just sayin' if somebody as the same issue.

jutzig commented 8 years ago

Glad it worked for you now. Seems to depend highly on which mirror you end up with. Unfortunately there isn't much that can be done on the client side as far as I can see.