3

我正在尝试使用我的 github 帐户为 CD设置本地drone.io 服务器。我正在使用官方的 docker 容器。设置说明说要在 github 设置中添加一个应用程序以获取无人机 github 远程配置所需的客户端 ID 和密码,我已经这样做了,与官方文档的唯一区别是我在“开发人员”上看到“注册新应用程序”应用程序”而不是“授权应用程序”,我希望它是一样的。然后,我定义了环境变量:

REMOTE_DRIVER=github
REMOTE_CONFIG=https://github.com?client_id=${client_id}&client_secret=${client_secret}

用我自己的替换客户端 ID 和密码。然后我启动容器并尝试登录,我被重定向到 github 的授权页面,我对其进行授权,当重定向回来时,我收到此错误:

无法登入。注册已关闭。

重定向的 URL 是:

http://drone.myserver.com/login?error=access_denied

我真的不知道可能丢失/配置错误的内容,相同的设置适用于 bitbucket 遥控器。

4

2 回答 2

3

发现了问题。浏览无人机问题我发现这个问题提到我需要将open=true添加到查询字符串中,以便无人机能够创建 github 应用程序。

于 2015-12-17T02:58:26.823 回答
0

如果您在网络无人机中获得 access_denied

这是 docker-compose 和 answer -> DRONE_OPEN=true:
version: '2' services: drone-server: image: drone/drone:0.7 ports: - 80:8000 volumes: - ./drone:/var/lib/drone/ restart: always environment: - DRONE_GITLAB=true - DRONE_GITLAB_CLIENT=change_value - DRONE_GITLAB_SECRET=change_value - DRONE_GITLAB_URL=https://gitlab-01example.com - DRONE_SECRET=change_value - DRONE_GITLAB_SKIP_VERIFY=true - DRONE_DEBUG=true - DRONE_OPEN=true drone-agent: image: drone/drone:0.7 command: agent restart: always depends_on: - drone-server volumes: - /var/run/docker.sock:/var/run/docker.sock environment: - DRONE_SERVER=ws://drone-server:8000/ws/broker - DRONE_SECRET=change_value - DRONE_GITLAB_SKIP_VERIFY=true

于 2018-05-22T07:14:56.147 回答