Selfhosted GitLab Oauth Error #2908

Closed
opened 2026-02-05 05:41:50 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @bit0fun on GitHub (Jul 19, 2022).

Describe the Bug

After following the install guide and reading the previous issues of #3059 and #2717,
I still have the issue of the response from my self hosted gitlab instance:

"Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."

Steps to Reproduce

  1. Configure selfhosted Gitlab instance with instance wide application keys
  2. Edit docker-compose.yml to the following
version: '2'
services:
  bookstack:
    image: ghcr.io/linuxserver/bookstack:v22.06.2-ls26
    container_name: bookstack
    environment:
      - APP_URL=https://docs.slant.tech
      - DB_HOST=bookstack_db
      - DB_USER=bookstack
      - DB_PASS=gBYzBspNSWyKCwbL6L22
      - DB_DATABASE=bookstackapp
      - GITLAB_APP_ID={[redacted]}
      - GITLAB_APP_SECRET={[redacted]}
      - GITLAB_BASE_URI=https://gitlab.[redacted]/

    volumes:
      - /[redacted]/bookstack/data:/config
    ports:
      - "8034:80"
      - "4446:443"
    restart: unless-stopped
    depends_on:
      - bookstack_db
  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - MYSQL_ROOT_PASSWORD=[redacted]
      - TZ=[redacted]
      - MYSQL_DATABASE=[redacted]
      - MYSQL_USER=[redacted]
      - MYSQL_PASSWORD=[redacted]
    volumes:
      - /[redacted]/bookstack/db:/config
    restart: unless-stopped
  1. Run docker-compose up -d
  2. Attempt to login with selfhosted gitlab credentials by clicking on gitlab button
  3. Get shown error message below
    gitlab_error

Expected Behaviour

Able to log in with gitlab as SSO oauth provider

Screenshots or Additional Context

I am running bookstack inside docker, with the image provided by lscr.io/linuxserver/bookstack
as the other one in the documentation does not appear to work for me. I keep getting database connection issues

I don't know if relevant at all, but I always see this line in the docker logs when starting up the container:
/etc/cont-init.d/50-config: line 98: warning: command substitution: ignored null byte in input

I selected the instance wide application interface for the authentication in my gitlab instance, not sure if that is the cause of the issues? By default a grafana instance is created by gitlab, and the oauth provided from that works fine.

My only other thoughts in terms of something that could be wrong, is the SSL certificates. I made sure to have everything point to the correct part, with replacing the docker ssl certificates with the ones I have gotten from letsencrypt inside the docker container.

It doesn't complain, so I'm assuming it is fine.

Browser Details

Firefox 102.0.1

Exact BookStack Version

v22.06.2-ls26

PHP Version

No response

Hosting Environment

Docker version 20.10.17, build 100c70180f
Database image: lscr.io/linuxserver/mariadb
nginx version: nginx/1.22.0
Host: Arch Linux

Originally created by @bit0fun on GitHub (Jul 19, 2022). ### Describe the Bug After following the install guide and reading the previous issues of #3059 and #2717, I still have the issue of the response from my self hosted gitlab instance: "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method." ### Steps to Reproduce 1. Configure selfhosted Gitlab instance with instance wide application keys 2. Edit docker-compose.yml to the following ``` version: '2' services: bookstack: image: ghcr.io/linuxserver/bookstack:v22.06.2-ls26 container_name: bookstack environment: - APP_URL=https://docs.slant.tech - DB_HOST=bookstack_db - DB_USER=bookstack - DB_PASS=gBYzBspNSWyKCwbL6L22 - DB_DATABASE=bookstackapp - GITLAB_APP_ID={[redacted]} - GITLAB_APP_SECRET={[redacted]} - GITLAB_BASE_URI=https://gitlab.[redacted]/ volumes: - /[redacted]/bookstack/data:/config ports: - "8034:80" - "4446:443" restart: unless-stopped depends_on: - bookstack_db bookstack_db: image: lscr.io/linuxserver/mariadb container_name: bookstack_db environment: - MYSQL_ROOT_PASSWORD=[redacted] - TZ=[redacted] - MYSQL_DATABASE=[redacted] - MYSQL_USER=[redacted] - MYSQL_PASSWORD=[redacted] volumes: - /[redacted]/bookstack/db:/config restart: unless-stopped ``` 3. Run docker-compose up -d 4. Attempt to login with selfhosted gitlab credentials by clicking on gitlab button 5. Get shown error message below ![gitlab_error](https://user-images.githubusercontent.com/11635710/179655026-680bdd60-18a5-4777-8a00-5eeddbdc5c2b.png) ### Expected Behaviour Able to log in with gitlab as SSO oauth provider ### Screenshots or Additional Context I am running bookstack inside docker, with the image provided by lscr.io/linuxserver/bookstack as the other one in the documentation does not appear to work for me. I keep getting database connection issues I don't know if relevant at all, but I always see this line in the docker logs when starting up the container: /etc/cont-init.d/50-config: line 98: warning: command substitution: ignored null byte in input I selected the instance wide application interface for the authentication in my gitlab instance, not sure if that is the cause of the issues? By default a grafana instance is created by gitlab, and the oauth provided from that works fine. My only other thoughts in terms of something that could be wrong, is the SSL certificates. I made sure to have everything point to the correct part, with replacing the docker ssl certificates with the ones I have gotten from letsencrypt inside the docker container. It doesn't complain, so I'm assuming it is fine. ### Browser Details Firefox 102.0.1 ### Exact BookStack Version v22.06.2-ls26 ### PHP Version _No response_ ### Hosting Environment Docker version 20.10.17, build 100c70180f Database image: lscr.io/linuxserver/mariadb nginx version: nginx/1.22.0 Host: Arch Linux
OVERLORD added the 🐛 Bug label 2026-02-05 05:41:50 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jul 19, 2022):

Hi @bit0fun,
You need to remove the {} curly braces from around your GITLAB_APP_ID and GITLAB_APP_SECRET values.

@ssddanbrown commented on GitHub (Jul 19, 2022): Hi @bit0fun, You need to remove the `{}` curly braces from around your `GITLAB_APP_ID` and `GITLAB_APP_SECRET` values.
Author
Owner

@bit0fun commented on GitHub (Jul 19, 2022):

Ah I misread the comment
# Replace the below (including '{}' braces) with your GitLab Application Id and Secret values.

Finally works perfectly, thank you! Was weird since I did that earlier and was having issues, but seems to be ok now

@bit0fun commented on GitHub (Jul 19, 2022): Ah I misread the comment `# Replace the below (including '{}' braces) with your GitLab Application Id and Secret values.` Finally works perfectly, thank you! Was weird since I did that earlier and was having issues, but seems to be ok now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2908