I’m setting up Gitlab login for self-hosted Taiga. Following the guidelines, I need to first create a Gitlab application with id and secret to fill in GITLAB_API_CLIENT_ID and GITLAB_API_CLIENT_SECRET accordingly in docker-composel.yml . But I cannot figure out the redirect-url for the application which is a must for Gitlab to create the application.
Say my instance is hosted at https://my-taiga.io:9000. Could you please help me find out the redirect url for Gitlab?
Thank you!
p.s. From my experience with other products using Gitlab login, the redirect url seems to have an instance id inside, like (for example) https://my-taiga.io:9000/login/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/callback. If so, how should I find out the instance id?
Below is a screenshot of my Gitlab “create application” page.
However, when I come back to Taiga from the Gitlab login page, Taiga complains Oops, something went wrong... and I cannot log in. The next line in the red bar says
Out Oompa Loompas have not been able to get you credentials from GitLab.
I got stuck because I had only limited ways to debug. From the docker compose logs, I found a 500 error with taiga-gateway. The error message was like
I don’t think it has anything to do with ssl certificates. It may be a configuration problem in the backend (taiga-back) because it is not being able to connect to Gitlab.
Maybe you can find more info about the error with docker compose logs taiga-back before login.
Check your docker-compose.yml file and add all the settings needed in each section:
After some trail n error I found something which seems to be the cause:
(I’m hosting Gitlab v16.1 as a docker container)
The failed request POST /api/v1/auth seems to call /api/v3/user of Gitlab api, while I found in Gitlab’s doc that the only supported version is 4 as noted here. So I suppose there could be an update for the Gitlab auth connector.
If this is the case please let me know. Thanks!
Below is the code from taiga-contrib-gitlab-auth repo
Yes, v3 was deprecated in 2018. You define the URL of your instance in docker-compose.yml with the variable GITLAB_URL. What value are you using for it?
My Gitlab (v16.1.1) is accessible from https://sdird.com:8000, so I think GITLAB_URL=https://sdird.com:8000. Is it correct?
I mean with the code in taiga-contrib-gitlab-auth, after the login the taiga-backend seems to call https://sdird.com:8000/api/v3/user while it should be https://sdird.com:8000/api/v4/user. – Are we acutally using taiga-contrib-gitlab-auth to login in via Gitlab?
Sorry, I found the error. We have to upgrade the plugin to make it compatible with the new API. However, I don’t understand how tree.taiga.io keeps working, using the Gitlab’s SaaS.
Do we have any updates for now? I’m afraid that my team has been blocked from using Taiga due to the login issue. Could you please prioritize this task? Or do we have any other ways to work around the problem?
The situation has not changed much since my last comment. The team is focused on the development of Taiga Next and our dedication (to Taiga 6.x) is limited. As workaround, users can use the same email they use in gitlab so that when the problem is fixed, the accounts will be joined after gitlab plugin activation.
I hope we can release a new version of the plugin soon.
If you still cannot connect, having verified your settings are correct, please send us your payload data in the Developer Tools window and your docker console logs while you’re trying to log in:
Thank you for getting back to me. I have configured it as per your instructions.
Headers
The problem is a Bad gateway error
Request URL: https://taiga.test.live/api/v1/auth
Request Method: POST
Status Code: 400 Bad Request
Remote Address: 103.152.xxx.xx:443
Referrer Policy: strict-origin-when-cross-origin
There’s something I don’t get. Why do say it’s a “Bad gateway error” if the POST auth/v1/auth request returns a Status Code: 400 Bad Request.
I’m assuming you’ve set a secure https conexion in your .env file (TAIGA_SCHEME=https) and that’s why you’re seing the 443 port and you use https://taiga.test.live to access your installation.
Accordingly, you have to configure in gitlab a proper Callback URL with your https://taiga.test.live/login url.
Whit this, and the previous configration in the docker-compose.yml to activate and configure the gitlab pluging, you should be able to log in.
A bad gateway error would probably reflect an nginx problem.