Uploaded image for project: 'AppFormer'
  1. AppFormer
  2. AF-2384

Cloning from remote git repo that requires credentials does not work

XMLWordPrintable

    • 2019 Week 47-49 (from Nov 18)
    • 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
    • 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.
    • NEW
    • NEW

      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.

              rh-ee-pefernan Pere Fernandez Perez
              rh-ee-pefernan Pere Fernandez Perez
              Jan Stastny Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: