Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-2531

Cloning from remote git repo that requires credentials does not work

    Details

    • Target Release:
    • Steps to Reproduce:
      Hide

      Install RHPAM.7.5 and try to import a project from a remote git repo that requires authentication.

      Example project: https://gitlab.consulting.redhat.com/erouvas/az0126_2

      Trying to import the project results in error with the following in the logs:

      Caused by: java.lang.RuntimeException: org.eclipse.jgit.api.errors.TransportException: https://gitlab.consulting.redhat.com/erouvas/az0126_2.git: not authorized
      at org.uberfire.java.nio.fs.jgit.util.commands.Fetch.execute(Fetch.java:68)
      at org.uberfire.java.nio.fs.jgit.util.GitImpl.fetch(GitImpl.java:250)
      at org.uberfire.java.nio.fs.jgit.util.commands.Clone.execute(Clone.java:115)
      ... 33 more
      Caused by: org.eclipse.jgit.api.errors.TransportException: https://gitlab.consulting.redhat.com/erouvas/az0126_2.git: not authorized
      at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:254)
      at org.uberfire.java.nio.fs.jgit.util.commands.Fetch.execute(Fetch.java:64)
      ... 35 more
      Caused by: org.eclipse.jgit.errors.TransportException: https://gitlab.consulting.redhat.com/erouvas/az0126_2.git: not authorized
      at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:531)
      at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:361)
      at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:137)
      at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:123)
      at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1271)
      at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:243)

      Same project is imported with no issues in RHPAM.7.4.1

      Trying to import the project through the REST API clone endpoint results in the same error:

      Example command for the REST API:
      cat << __MYPROJECT > create.project

      { "name": "$prj_name", "description": "$prj_name", "userName": "$GITLAB_USER", "password": "$GITLAB_PASS", "gitURL": "$GIT_PRJ_URL" }

      __MYPROJECT
      curl -k -s -u 'pamAdmin:pamPassword' \
      -H 'Accept: application/json' -H 'content-type: application/json' \
      -X POST http://localhost:8080/business-central/rest/spaces/MySpace/git/clone -d @create.project

      Show
      Install RHPAM.7.5 and try to import a project from a remote git repo that requires authentication. Example project: https://gitlab.consulting.redhat.com/erouvas/az0126_2 Trying to import the project results in error with the following in the logs: Caused by: java.lang.RuntimeException: org.eclipse.jgit.api.errors.TransportException: https://gitlab.consulting.redhat.com/erouvas/az0126_2.git: not authorized at org.uberfire.java.nio.fs.jgit.util.commands.Fetch.execute(Fetch.java:68) at org.uberfire.java.nio.fs.jgit.util.GitImpl.fetch(GitImpl.java:250) at org.uberfire.java.nio.fs.jgit.util.commands.Clone.execute(Clone.java:115) ... 33 more Caused by: org.eclipse.jgit.api.errors.TransportException: https://gitlab.consulting.redhat.com/erouvas/az0126_2.git: not authorized at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:254) at org.uberfire.java.nio.fs.jgit.util.commands.Fetch.execute(Fetch.java:64) ... 35 more Caused by: org.eclipse.jgit.errors.TransportException: https://gitlab.consulting.redhat.com/erouvas/az0126_2.git: not authorized at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:531) at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:361) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:137) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:123) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1271) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:243) Same project is imported with no issues in RHPAM.7.4.1 Trying to import the project through the REST API clone endpoint results in the same error: Example command for the REST API: cat << __MYPROJECT > create.project { "name": "$prj_name", "description": "$prj_name", "userName": "$GITLAB_USER", "password": "$GITLAB_PASS", "gitURL": "$GIT_PRJ_URL" } __MYPROJECT curl -k -s -u 'pamAdmin:pamPassword' \ -H 'Accept: application/json' -H 'content-type: application/json' \ -X POST http://localhost:8080/business-central/rest/spaces/MySpace/git/clone -d @create.project
    • Workaround Description:
      Hide

      You clone the project in a local file system and then use that to import into BusinessCentral.

      However that breaks existing workflows and requires command-line interaction as well as a cleaning up step afterwards.

      Show
      You clone the project in a local file system and then use that to import into BusinessCentral. However that breaks existing workflows and requires command-line interaction as well as a cleaning up step afterwards.
    • Affects:
      Release Notes
    • Sprint:
      2019 Week 47-49 (from Nov 18), 2019 Week 50-52 (from Dec 9)
    • QE Test Coverage:
      +

      Description

      Trying to clone a project from a non-public remote git repo, i.e. one that requires credentials, into Business Central of RHPAM.7.5 results in authentication error and the project is not imported.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pere.fernandez Pere Fernandez Perez
                  Reporter:
                  rouvas Stathis Rouvas
                  Tester:
                  Tomas David
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: