fanux
(Steven)
August 10, 2020, 7:11am
1
GitLab Community Edition 8.3.2 6288d134c, OAuth2 login failed.
docker run \
--volume=/var/lib/drone:/data \
--env=DRONE_GITLAB_SERVER=http://gitlab.xxx.com/ \
--env=DRONE_GITLAB_CLIENT_ID=fae4b8b20b4022cf2f0d564a97dd79259b0d859b9db08c5686c83d89a9c219d6 \
--env=DRONE_GITLAB_CLIENT_SECRET=e971889a1d69d6303bc3c0225f57b8a3fae427557a06533058ac00c58acee163 \
--env=DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 \
--env=DRONE_SERVER_HOST=100.7.146.28:80 \
--env=DRONE_SERVER_PROTO=http \
--env=DRONE_TLS_AUTOCERT=false \
--publish=80:80 \
--publish=443:443 \
--restart=always \
--detach=true \
--name=drone \
drone/drone:1.9.0
this error indicates you are being served an HTTP webpage instead of a JSON API endpoint. The most common root causes for this error is that you configure an http address instead of https, and gitlab automatically tried to redirect. We have also seen people encounter issues with reverse proxies (nginx, etc) in which case you should check your configuration.
Example:
I have a same issue with drone 1.6.5 and gitea 1.11 environment, and found a workaround.
The issue seems to occurring when DRONE_GITEA_SERVER environment variable have trailing /.
Like this,
- DRONE_GITEA_SERVER=https://try.gitea.io/
+ DRONE_GITEA_SERVER=https://try.gitea.io
I think, it is need to write in the document page about should remove a trailing `` / ‘’ at least.
Such as this page, https://docs.drone.io/server/reference/drone-gitea-server/
fanux
(Steven)
August 13, 2020, 2:57am
3
So this issue is not caused by gitlab version? Someone upgrade the gitlab version to 11.x and fixed this.
Using https://gitlab.xxx.com can fixed this?
fanux
(Steven)
August 13, 2020, 3:09am
4
The redirect URI included is not valid.
My gitlab https server is fine.
This is my drone config:
docker run \
--volume=/var/lib/drone:/data \
--env=DRONE_GITLAB_SERVER=https://gitlab.xxxx.com/ \
--env=DRONE_GITLAB_CLIENT_ID=3daf03e17fcb31e29ba22edfe2743c06c9267c41b7ddbfecd38888eb2952a660 \
--env=DRONE_GITLAB_CLIENT_SECRET=700811167630a037238c33649ed69c0ecf9c1a585a40eb3e159994b8c90afccf \
--env=DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6 \
--env=DRONE_SERVER_HOST=11.140.100.47:80 \
--env=DRONE_SERVER_PROTO=http \
--env=DRONE_TLS_AUTOCERT=true \
--publish=80:80 \
--publish=443:443 \
--restart=always \
--detach=true \
--name=drone \
drone/drone:1.9.0
fanux
(Steven)
August 13, 2020, 3:25am
5
Or I need config drone server https?