Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GIT_CREDENTIAL_ENV to build private repos #42

Merged
merged 6 commits into from
Mar 2, 2021

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Feb 9, 2021

Fixes #27

This makes it possible to pass a username and password from the UI:

private-repo.mp4

Using repo2docker support for GIT_CREDENTIAL_ENV (some info in jupyterhub/repo2docker@504aeb7)

For example with GitHub, a user can generate a new access token with the read scope:

image

And use this token as the password.

Similar with GitLab:

image

@jtpio
Copy link
Member Author

jtpio commented Feb 9, 2021

Hiding the credential inputs in a <section> tag:

optional-credentials.mp4

@jtpio
Copy link
Member Author

jtpio commented Feb 9, 2021

cc @adriendelsalle this makes it possible to provide credentials to be able to clone private repositories.

It looks like providing a username and password might be a better option than using basic auth in the repo URL and then stripping it. This also leverages the GIT_CREDENTIAL_ENV env var from repo2docker, which is also used in Binder (via the git_credentials trait)

@jtpio jtpio changed the title Add support for GIT_CREDENTIAL_ENV Add support for GIT_CREDENTIAL_ENV to build private repos Feb 9, 2021
@jtpio jtpio marked this pull request as ready for review February 9, 2021 11:58
@srggrs
Copy link

srggrs commented Feb 10, 2021

when this is going to be merged?

@jtpio
Copy link
Member Author

jtpio commented Feb 10, 2021

@srggrs probably soon.

If you would like to test, you can install the plugin from this branch with the following passed to the TLJH installer:

--plugin git+https://github.com/jtpio/tljh-repo2docker@private-repos

@jtpio
Copy link
Member Author

jtpio commented Feb 16, 2021

cc @pierrepo in case you have some inputs w.r.t the UI, since it adds two new fields to the dialog (collapsed by default)

@pierrepo
Copy link
Contributor

Hey @jtpio sorry for the delay.
This looks very nice to me. This is a very useful functionality.

@jtpio
Copy link
Member Author

jtpio commented Mar 2, 2021

Thanks for checking it out 👍

@jtpio jtpio merged commit 35e7e94 into plasmabio:master Mar 2, 2021
@jtpio jtpio deleted the private-repos branch March 2, 2021 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for private repositories
3 participants