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

Enterprise Github without HTTPS not supported #12

Closed
next2you opened this issue Jul 17, 2012 · 3 comments
Closed

Enterprise Github without HTTPS not supported #12

next2you opened this issue Jul 17, 2012 · 3 comments

Comments

@next2you
Copy link

Hi,

just tried your plugin on jenkins with our internal enterprise github. This is only accessible via http (not https). The code to access the api always adds the "https://api" prefix in front of it.

Github-api plugin: 1.28
Oauth plugin: 0.12

If I have time I'll try to find a workaround... Maybe someone knows quickly how this could be fixed :-)

Christian

Btw, the stacktrace says "plain" connection because I've entered the URL to github in jenkins to be http://github.internal.net:80

Stack trace is attached,

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
    at org.kohsuke.github.GitHub.parse(GitHub.java:300)
    at org.kohsuke.github.GitHub._retrieve(GitHub.java:186)
    at org.kohsuke.github.GitHub.retrieveWithAuth(GitHub.java:175)
    at org.kohsuke.github.GitHub.getMyself(GitHub.java:365)
    at org.kohsuke.github.GitHub.(GitHub.java:114)
    at org.kohsuke.github.GitHub.connectUsingOAuth(GitHub.java:145)
    at org.jenkinsci.plugins.GithubAuthenticationToken.(GithubAuthenticationToken.java:68)
    at org.jenkinsci.plugins.GithubSecurityRealm.doFinishLogin(GithubSecurityRealm.java:315)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
    at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:203)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:488)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:162)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
    at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
    at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
@kohsuke
Copy link
Collaborator

kohsuke commented Aug 28, 2012

Thanks. I didn't realize GitHub Enterprise supports plain HTTP access.

@jkoops27
Copy link

jkoops27 commented Sep 4, 2012

We have problems connecting to our GitHub Enterprise, also, there is no public constructor where one can pass the hostname.

BTW: Did you ever thought switching to the 'official' Client API of GitHub (https://github.com/eclipse/egit-github/tree/master/org.eclipse.egit.github.core)

@kohsuke
Copy link
Collaborator

kohsuke commented Jan 6, 2013

Implemented in 1.34.

@kohsuke kohsuke closed this as completed Jan 6, 2013
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