Binderhub unable to access private repo with git-credential-env
See original GitHub issueBug description
When running binderhub with repo2docker, binderhub is unable to clone from a private repo.
Expected behaviour
Binderhub should be able to clone from a private repo and start building the image.
Actual behaviour
How to reproduce
- Deploy binderhub using 0.2.0-c8ab0a3 with repo2docker a251ad26 w/ a github access token
- Try to create a new binder using a link to a private github repo
- Build will fail with error above
Your personal set up
- OS: macOS 10.13.6
- Docker version: Docker version 18.09.2, build 6247962
- repo2docker version: image tag a251ad26
- binderhub version: 0.2.0-c8ab0a3
Github section of my secrets.yaml
:
config:
GitHubRepoProvider:
access_token: ****
Access token has the proper permissions:
Workaround
I was able to narrow down the cause of the issue to a git install change in the Dockerfile
: https://github.com/jupyter/repo2docker/commit/ee93bcf1a6155a71c8978b78b8bf03282dbdf088#diff-3254677a7917c6c01f55212f86c57fbf
I reverted this change to the Dockerfile
(used python:3.7
instead of alpine
) and built the image locally to use for my binderhub deployment and was able to successfully clone and build from a private github repo.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Binderhub unable to access private repo with git-credential-env
When running binderhub with repo2docker, binderhub is unable to clone from a private repo. Expected behaviour. Binderhub should be able to clone ...
Read more >Private Gitlab Access for BinderHub - Jupyter Community Forum
We run our own GitLab installation, and are able to use its public repos as BinderHub sources with no problem. However, we are...
Read more >How can one use Binder (mybinder.org) with private Github ...
For access to private repos, you can deploy BinderHub, the software that powers mybinder.org, yourself, or use repo2docker, the tool that ...
Read more >3. Set up BinderHub
Since users never enter credentials into BinderHub, BinderHub itself must be given permission to clone any private repositories you want BinderHub to be...
Read more >Accessing private GitHub repos - UC Berkeley's JupyterHubs
Note: Everyone on the selected JupyterHub can clone your private repo if you do this. They won't be able to see that this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yeah that sounds good to me as well, I’ll have a PR out sometime today
@betatim alright i figured out what’s going on, the
git-credential-env
file requires bash, and the new repo2dockerDockerfile
is based onalpine
which doesn’t come with bash by default, I confirmed that adding bash installation to the existingDockerfile
fixes the bug (adds ~5MB to the image)