Skip to content

GitLab Token (env) not found after update #678

@weberpatr

Description

@weberpatr

Hello,

I just updated my SourceBot instance from v4.6.7 to latest 4.10.3.
I also applied the required configuration change about the required ENV CONFIG_PATH.
But now I struggle about the token configuration.

config.json:

{
    "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
    "connections": {
            "company-gitlab": {
                  "all": true,
                  "url": "https://gitlab.company.io",
                  "type": "gitlab",
                  "token": {
                    "env": "GITLAB_TOKEN"
                  },
                  "exclude": {
                    "archived": true,
                    "userOwnedProjects": true
                  }
            }
    }
}

compose.yaml:

  sourcebot:
    container_name: sourcebot
    image: ghcr.io/sourcebot-dev/sourcebot:v4.10.3
    restart: unless-stopped
    environment:
      CONFIG_PATH: "/data/config.json"
      GITLAB_TOKEN: "glpat-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      AUTH_URL: "https://sourcebot.company.io"
      SOURCEBOT_TELEMETRY_DISABLED: "true"
    volumes:
      - /opt/sourcebot/data:/data
    ports:
      - "3000:3000"

ENV command inside docker container

# env | grep GITLAB
GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

But the UI reports the connection as failed with the message: Environment variable GITLAB_TOKEN not found..
I also tried adding the secret as env to data/.sourcebot/.secret with the same result.

Any idea what I'm missing?

Metadata

Metadata

Labels

bugSomething isn't workinggitlabIssues related to integrating or supporting GitLab functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions