-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitlab API URL is not used #861
Comments
You do not need to edit the code. As administrator. Change it from the GUI Administration -> Accounts -> GITLAB and then SAVE CHANGES ; and you're done. |
@Sing-Li Yeah Accounts section is to set Oauth2 credentials, that is Ok but my problem (on my env) is API section with When setting my own gitlab url aka http://anakin/gitlab and save. When I try to login with Gitlab, popup is redirected to gitlab.com and not mine |
cool ! 😄 Thanks for the detailed extended information! We have recently replaced the gitlab-specific oauth handling code with a generalized package. I've just confirmed the bug on a brand new install. Hopefully @marceloschmidt will see this in the morning. |
It's not that this is a bug. I think we should make this clearer: The In Administration / Accounts, the GitLab section will always point to If you want to enable logging in with your custom gitlab server, you must add a Custom OAuth with the following settings:
Don't forget to add your rocket.chat instance application in your gitlab server. The Callback URL must be IMPORTANT |
It's a bug @marceloschmidt, I fixed now You can use the GitLab oAuth setting the API url to point to your server |
but callback url should be Actually I'm using second. |
@kakawait if you setup the gitlab oauth using the section GitLab you should use |
@rodrigogs I just pull lasted version and yes the popup now redirect to my custom Gitlab. However I got an error and inside log I saw something like
Some trace of https://gitlab.com/oauth/token? May just log error ? Tested on Gitlab 8 with new application credentials and from scratch rocketchat mongo database then see logs before |
If it can help I add log on server
|
Did you restart your server after that? I had a similar issue with github integration, and it worked after a restart. |
Same problem with 100% fresh installation |
After changing your gitlab api url in administration/settings, restart your rocket.chat server, so it can read the settings again. We'll fix that on #849. |
@marceloschmidt even after restarting server
or
error persists. But it may possible that #849 fix problem, I don't know but unlike |
Sorry then! I thought it could be related to what I'm having with wordpress... If I find a fix for WP, I'll let you know, so you can re-test... |
@rodrigok if you are ok to reopen issue? |
@kakawait do you have access to the main repo? can you pull my changes from a minute ago and give it another try? |
very nice @kakawait 👍 |
@kakawait can you please test again? Thanks |
Using last commit 51c242c it works except from fresh install. I must restart server else I have this error
|
@kakawait is it working now? |
@rodrigok using 20e768c same error as #861 (comment) using fresh install (aka empty db)
|
Same issue for me, using custom gitlab server but getting the "Internal server error" |
It's happening here with me too, I believe it's something related to the port. I'm running Rocket in port 80 but it stills build the redirect URI with :3000 port |
I subscribed. I am dealing with something similar... |
I've made a few more tests and it seems to be working now. Please, whoever was having problem with it, can you test again? Thanks. |
Using 0.18.1 I encountered the exact same error message than this comment and restarting the server also solved it. |
Any tips for getting oauth working where Rocket.Chat and Gitlab are installed on the same server with Gitlab installed at the root url and Rocket.Chat in a relative url /chat ? |
FYI: the issue outlined in #861 (comment) still persists in version 0.35.0. It gets fixed by a server restart tho. |
Using last commit 1875e33 when setting
API_Gitlab_URL
(I checked on mongo setting is persisted) Gitlab authentication still redirect on https://gitlab.com.I need to edit https://github.com/RocketChat/Rocket.Chat/blob/master/packages/rocketchat-gitlab/common.coffee#L2 in order to work
The text was updated successfully, but these errors were encountered: