• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • Gerrit 2.15

      Is SSH supported? I get the following exception when using ssh:

      org.apache.http.conn.UnsupportedSchemeException: ssh protocol is not supported
      	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:109)
      	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
      	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
      	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
      	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
      	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
      	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
      	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
      	at com.urswolfer.gerrit.client.rest.http.HttpRequestExecutor.execute(HttpRequestExecutor.java:34)
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.tryGerritHttpAuth(GerritRestClient.java:306)
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.updateGerritAuth(GerritRestClient.java:261)
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.updateGerritAuthWhenRequired(GerritRestClient.java:255)
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.request(GerritRestClient.java:182)
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.requestRest(GerritRestClient.java:163)
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.requestRest(GerritRestClient.java:155)
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.requestJson(GerritRestClient.java:132)
      Caused: com.google.gerrit.extensions.restapi.RestApiException: Request failed.
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.requestJson(GerritRestClient.java:147)
      	at com.urswolfer.gerrit.client.rest.http.GerritRestClient.getRequest(GerritRestClient.java:101)
      	at com.urswolfer.gerrit.client.rest.http.changes.ChangesRestClient.get(ChangesRestClient.java:113)
      	at com.urswolfer.gerrit.client.rest.http.changes.ChangesRestClient.access$000(ChangesRestClient.java:35)
      	at com.urswolfer.gerrit.client.rest.http.changes.ChangesRestClient$1.get(ChangesRestClient.java:78)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource.getOpenChanges(AbstractGerritSCMSource.java:175)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource.access$100(AbstractGerritSCMSource.java:59)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource$1.discoverBranches(AbstractGerritSCMSource.java:124)
      Caused: java.io.IOException
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource$1.discoverBranches(AbstractGerritSCMSource.java:156)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource$1.run(AbstractGerritSCMSource.java:98)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource$1.run(AbstractGerritSCMSource.java:82)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource.doRetrieve(AbstractGerritSCMSource.java:497)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource.retrieve(AbstractGerritSCMSource.java:81)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:631)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1022)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      

          [JENKINS-50586] SSH support

          SSH isn't supported at the moment. I am planning to work on it in the next few days and release it.

          Luca Domenico Milanesio added a comment - SSH isn't supported at the moment. I am planning to work on it in the next few days and release it.

          Alon Bar-Lev added a comment -

          This is important for proper authentication, the http is weak and problematic.

          Thanks!

          Alon Bar-Lev added a comment - This is important for proper authentication, the http is weak and problematic. Thanks!

          lucamilanesio, you said on GitHub before you removed issues there that you were planning on releasing a guide on how to use git/ssh with this plugin.

          I wrote on GerritHub but didn't get any answer from you there, so I'm trying here. 

          I've managed to nag the powers that be so I have a REST password now, but checkout still needs to happen over SSH. How do I solve that?

          Thanks!

          Erik Håkansson added a comment - lucamilanesio , you said on GitHub before you removed issues there that you were planning on releasing a guide on how to use git/ssh with this plugin. I wrote on GerritHub but didn't get any answer from you there, so I'm trying here.  I've managed to nag the powers that be so I have a REST password now, but checkout still needs to happen over SSH. How do I solve that? Thanks!

          Igwe Kalu added a comment -

          I observed exact same issue when executing "Scan Multibranch Pipeline Now". This strongly diminishes the value of the gerrit-code-review-plugin.

          Igwe Kalu added a comment - I observed exact same issue when executing " Scan Multibranch Pipeline Now ". This strongly diminishes the value of the gerrit-code-review-plugin.

          Any updates on this issue? In my case, Gerrit and the Jenkins master is on the same server, but the job has to run on a worker instance. If I set the url to ssh, the worker can clone the repo, but the pipeline scan fails, if I set the url to http, the scan works, but the worker can't clone the repo. Everything on that server is behind a strong SSO, and it is not really possible to let Gerrit out to the internet on the HTTP port.

          Tamas Demeter-Haludka added a comment - Any updates on this issue? In my case, Gerrit and the Jenkins master is on the same server, but the job has to run on a worker instance. If I set the url to ssh, the worker can clone the repo, but the pipeline scan fails, if I set the url to http, the scan works, but the worker can't clone the repo. Everything on that server is behind a strong SSO, and it is not really possible to let Gerrit out to the internet on the HTTP port.

          tamasd I see your use-case and makes sense. I believe the solution would be to do all operations over SSH without having to require an HTTP port in that case.

          There are some REST-API that could be missing though over SSH: would that be acceptable for your use-case?

           

          Luca Domenico Milanesio added a comment - tamasd I see your use-case and makes sense. I believe the solution would be to do all operations over SSH without having to require an HTTP port in that case. There are some REST-API that could be missing though over SSH: would that be acceptable for your use-case?  

          Raising this as a blocker as more people are reporting it as blocking.

          Luca Domenico Milanesio added a comment - Raising this as a blocker as more people are reporting it as blocking.

          lucamilanesio yes, the CI script doesn't do anything crazy, just cloning the repo and running a build from there.

          Tamas Demeter-Haludka added a comment - lucamilanesio yes, the CI script doesn't do anything crazy, just cloning the repo and running a build from there.

          Tibo added a comment -

          Hi Luca, nice plugin. Any news on that issue?
          This is also blocking for me, since our Gerrit server configuration enforces SSH.

          Tibo added a comment - Hi Luca, nice plugin. Any news on that issue? This is also blocking for me, since our Gerrit server configuration enforces SSH.

          Donnie Kim added a comment - - edited

          Do we have any updates on this? If SSH support is not possible, then there is really no strong use case for us at the moment.

          Donnie Kim added a comment - - edited Do we have any updates on this? If SSH support is not possible, then there is really no strong use case for us at the moment.

            galarragas Stefano Galarraga
            johnv John V
            Votes:
            14 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated: