Unable to setup git authentication with coder

We have setup coder with our self hosted gitlab. We are trying to auto clone git repo for the 'Open in coder' functionality. The helm chart values are as follows:
    - name: CODER_GITAUTH_0_TYPE
      value: "gitlab"
    - name: CODER_GITAUTH_0_CLIENT_ID
      value : "xxxxx"
    - name: CODER_GITAUTH_0_CLIENT_SECRET
      value: "xxxx"
    - name: CODER_GITAUTH_0_AUTH_URL
      value: "https://somedomain.com/gitlab/login/oauth/authorize"
    - name: CODER_GITAUTH_0_TOKEN_URL
      value: "https://somedomain.com/gitlab/login/oauth/accesstoken"
    - name: CODER_GITAUTH_0_VALIDATE_URL
      value: "https://somedomain.com/gitlab/api/v3/user"
    - name: CODER_GITAUTH_0_REGEX
      value: "somedomain.com/gitlab"

Below is my workspace template:
data "coder_parameter" "git_repo" {
  name    = "Git repository"
  icon    = "https://upload.wikimedia.org/wikipedia/commons/3/3f/Git_icon.svg"
  default = ""
  type    = "string"
  mutable = true
}
.......
# Require git authentication
data "coder_git_auth" "gitlab" {
  id = "gitlab"
}
...
resource "coder_agent" "main" {
  ...
  env = {
    GITLAB_TOKEN : data.coder_git_auth.gitlab.access_token
  }

During creation of workspace with my template, I'm getting the below error:
Cloning git repo...
Cloning into 'test-coder'...
ERROR: No git provider found for URL "https://somedomain.com"
                                                                       
error: unable to read askpass response from '/tmp/coder.ulPn2F/coder'
fatal: could not read Username for 'https://somedomain.com': No such device or address

Our gitlab is hosted at
https://somedomain.com/gitlab
path. But it looks like coder is hitting
https://somedomain.com
instead. Could this be the reason of the error, though all the helm values have the proper details. Can someone help on this?
Was this page helpful?