Skip to content

cannot get use repository for gitlab enterprise due to domain and client base url seems to be incorrectly configured / used #176

@enekofb

Description

@enekofb

Describe the bug

When tried to create a gitlab client for an enterprise instance and then get a repo, i have an error saying that the gitlab
client is not able to consume my repo endpoint.

The issue seems to be an error on how the gitlab client uses `domain (reported here and how it handles base URL.

To Reproduce

scenario 1

  1. use the following gist
  2. configure your gitlab enterprise endpoint and repo
  3. execute the test and you will an error like the client doesn't support handling requests for this domain

scenario 2

  1. use the following gist which is similar to scenario 1 but commenting SupportedDomain call
  2. configure your gitlab enterprise endpoint and repo
  3. execute the test and you will an error like unsupported protocol scheme ""
    In this example, i could see how the underlying client baseurl is not properly created as shown in the image below

Screenshot 2022-12-28 at 23 14 47

Expected behavior

I can use gitlab client for getting repos from gitlab enterprise instances

Additional context

  • Go version: go version go1.19.1 darwin/arm64
  • Git provider: gitlab

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggitlabGitlab related issues and PRs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions