jutzig / github-release-plugin

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

Fix 16 using GitHub enterprise #17

Open lwiechec opened 8 years ago

lwiechec commented 8 years ago

Hi,

I have prepared a first draft of 1.1.2 version that should handle the GitHub Enterprise. It is still not 100% ready (read below), but - could you check if it can deploy with this one to github.com?...

I have still some trouble with publishing to GitHub Enterprise that I work with; I am getting 'connection time out' error, but we are running quite old version of the Enterprise (still need to update it, so it might be it):

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.590 s
[INFO] Finished at: 2016-04-01T14:55:51+02:00
[INFO] Final Memory: 12M/217M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal de.jutzig:github-release-plugin:1.1.2-SNAPSHOT:release (default-cli) on project nsili-taglib: Failed to upload assets: connect timed out -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.jutzig:github-release-plugin:1.1.2-SNAPSHOT:release (default-cli) on project nsili-taglib: Failed to upload assets
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    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:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    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:497)
    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: org.apache.maven.plugin.MojoExecutionException: Failed to upload assets
    at de.jutzig.github.release.plugin.UploadMojo.execute(UploadMojo.java:223)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 20 more
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1282)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1257)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
    at org.kohsuke.github.Requester.buildRequest(Requester.java:322)
    at org.kohsuke.github.Requester._to(Requester.java:233)
    at org.kohsuke.github.Requester.to(Requester.java:203)
    at org.kohsuke.github.GHRelease.uploadAsset(GHRelease.java:132)
    at de.jutzig.github.release.plugin.UploadMojo.uploadAsset(UploadMojo.java:249)
    at de.jutzig.github.release.plugin.UploadMojo.execute(UploadMojo.java:210)
    ... 22 more
lwiechec commented 8 years ago

Hi, I think I have figured out why it is not working on my GitHub Enterprise; check GHRelease, line 130; it is using hard-coded path to the 'regular' github.com, instead of Github Enterprise. And we are using it in UploadMojo. I have already submitter a bug report at gihub-api repo...

jutzig commented 8 years ago

Ah, that is to bad. If there is a new release that fixes the bug I will gladly merge your pull request and release a new version though.

Best regards, Johannes Am 02.04.2016 14:17 schrieb "Lukasz Wiechec" notifications@github.com:

Hi, I think I have figured out why it is not working on my GitHub Enterprise; check GHRelease, line 130 https://github.com/kohsuke/github-api/blob/master/src/main/java/org/kohsuke/github/GHRelease.java#L130; it is using hard-coded path to the 'regular' github.com, instead of Github Enterprise. And we are using it in UploadMojo https://github.com/lwiechec/github-release-plugin/blob/fix-16-using-Github-Enterprise/src/main/java/de/jutzig/github/release/plugin/UploadMojo.java#L249 . I have already submitter a bug report https://github.com/kohsuke/github-api/issues/266 at gihub-api repo...

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/jutzig/github-release-plugin/pull/17#issuecomment-204705776