使用自签名证书的GitHub Enterprise进行Jupyterhub身份验证

时间:2019-04-05 06:28:58

标签: python oauth jupyter jupyterhub

背景: 我试图使用GitHub Enterprise在JupyterHub上设置身份验证。我已经提供了配置文件。

我通过以下方式运行jupyterhub:sudo jupyterhub。使用GitHub Enterprise凭据登录后,在客户端上看到500服务器错误。在服务器上,我看到以下错误:

tornado.curl_httpclient.CurlError: HTTP 599: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

我怀疑是因为我的GitHub Enterprise托管有一个自签名证书。有办法解决这个问题吗? (我知道如果我拥有域,就可以获得证书,但是目前没有)。

我的联系人:

import os
os.environ['GITHUB_HOST'] = "<GITHUB-HOST IP>"
# os.environ['GITHUB_HTTP'] = "1" # Tried with and without this

from oauthenticator.github import GitHubOAuthenticator

c.JupyterHub.ip = '<jupyterhub-host>'
c.JupyterHub.port = <jupyterhub-port>

c.JupyterHub.authenticator_class = GitHubOAuthenticator
c.GitHubOAuthenticator.oauth_callback_url = 'https://<jupyterhub-ip>:<jupyterhub-port>/hub/oauth_callback'
c.GitHubOAuthenticator.client_id = '<client_id>'
c.GitHubOAuthenticator.client_secret = '<client_secret>'

c.LocalAuthenticator.create_system_users = True
c.Authenticator.whitelist = {'myuser'}
c.Authenticator.admin_users = {'myuser'}
c.JupyterHub.ssl_cert = 'certs/mycert.pem'
c.JupyterHub.ssl_key = 'certs/mykey.key'

问题:如何解决上述与GitHub企业一起设置JupyterHub身份验证的问题?

0 个答案:

没有答案