question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Binderhub unable to access private repo with git-credential-env

See original GitHub issue

Bug 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

Screen Shot 2019-07-09 at 10 02 41 AM

How to reproduce

  1. Deploy binderhub using 0.2.0-c8ab0a3 with repo2docker a251ad26 w/ a github access token
  2. Try to create a new binder using a link to a private github repo
  3. 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: Screen Shot 2019-07-08 at 3 23 57 PM

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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
eexwhyzeecommented, Jul 10, 2019

yeah that sounds good to me as well, I’ll have a PR out sometime today

1reaction
eexwhyzeecommented, Jul 10, 2019

@betatim alright i figured out what’s going on, the git-credential-env file requires bash, and the new repo2docker Dockerfile is based on alpine which doesn’t come with bash by default, I confirmed that adding bash installation to the existing Dockerfile fixes the bug (adds ~5MB to the image)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found