Closed jtpio closed 3 years ago
Documentation to access private repositories for BinderHub:
The token can be generated from the GitLab UI:
And I guess similar things could be done with the GitHub UI:
Optional extra git credentials could be in a <detail>
section of the form.
There could be an option to fill the password with the hub authentication token for the case where we use the gitlab's SSO.
For now
tljh-repo2docker
can build environments from repositories that are publicly accessible.However it would be useful if it could also build environments from private repositories.
BinderHub supports this use case with the
git_credentials
option.The value is then passed as a
GIT_CREDENTIAL_ENV
environment variable to the builder (thejupyter/repo2docker:master
Docker image): https://github.com/jupyterhub/binderhub/blob/3cb82fafa55d25e8fb6c6559423ffdef57919aa3/binderhub/build.py#L236For
tljh-repo2docker
, we would need to pass these credentials using theGIT_CREDENTIAL_ENV
environment variable to the command here:https://github.com/plasmabio/tljh-repo2docker/blob/05ce3d589822797e2834301239e76f0950bd87a8/tljh_repo2docker/docker.py#L82-L96
Something like the following:
The credentials could be specified in the form:
Or as a configurable for the
tljh_repo2docker
plugin.