Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17594

"Unexpected error when trying to find extension dependency" from private repository even if credentials exist

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 11.10.5
    • Fix Version/s: None
    • Component/s: Extension
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      When installing or updating an extension that comes from a private repository, it is normal to need to provide the credentials for that repository access. When doing so, it is also normal to set the same ID of the repository as the id used by the extension in its pom.xml:

      extension.repositories=repo-id:maven:repoURL
      extension.repositories.repo-id.auth.user=repoUser
      extension.repositories.repo-id.auth.password=repoPassword
      

      However, if we do that, we end up with this in the progress log and the install/update fails:

      Unexpected error when trying to find extension dependency [<Dependency name - version>] in repository [repo-id:maven:repoURL]: HttpResponseException: status code: 401, reason phrase: Unauthorized (401)
      

      However, if in xwiki.properties we use the same repoURL but instead of the repo-id we use a different one, e.g. repo-id-2, we still get the warning in the job log, but it does not fail anymore and it successfully installs the extension. Because of this extra work, it also takes much longer than usual.

      It may be related to something missing when XCOMMONS-1325 was implemented as maven repos with the same ID should probably be merged, so that EM sees them as only 1 (and it does not spend more time on it the second time and also so that the credentials defined in xwiki.properties get applied to both).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                enygma Eduard Moraru
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: