Drone.io Github 的 OAuth 问题

Drone.io OAuth issues with Github

我目前正在尝试使用我的 Github 帐户设置 Drone.io。我安装了 drone.io 并且可以正常工作 - 我能够访问本地主机上的 drone.io 登录页面。当我尝试登录以授权访问 Github 时,问题就开始了,因为 Github returns 错误 404 - "This is not the page you are looking for" 具有以下 url:

https://github.com/login/oauth/authorize?client_id=%thisIsCorrect&redirect_uri=http%3A%2F%2Flocalhost%2Fauthorize&response_type=code&scope=repo+repo%3Astatus+user%3Aemail+read%3Aorg&state=drone

我尝试使用 localhost 和 localhost/authorize 进行授权回调,但没有任何变化。谁能看出我做错了什么?

我的 Github 设置:

我的docker-撰写文件:

您的授权回调url似乎无效。根据官方设置说明,应该 http://localhost/authorize 而不是 http://localhost

Register your application with GitHub to create your client id and secret. It is very import the authorization callback URL matches your http(s) scheme and hostname exactly with /authorize as the path.

参考文档:http://readme.drone.io/admin/setup-github/

此外,环境部分看起来也有问题。 docker-compose 部分的环境变量不应该被引用。 Docker 当以 key=value 格式声明时,compose 不会取消引用值。

所以不要像这样引用值:

environment:
  - foo='bar'
  - baz=qux

您应该删除引号:

environment:
  - foo=bar
  - baz=qux

或者如果您需要引用值,您应该使用地图或 key=value 格式的数组。

environment:
  foo: "bar"
  baz: qux

参考docker撰写文档:https://docs.docker.com/compose/compose-file/#/environment