jupyterhub / gh-scoped-creds

Provide fine-grained push access to GitHub from a JupyterHub
BSD 3-Clause "New" or "Revised" License
24 stars 7 forks source link

Integration with Jupyter Git plugin? #56

Open cboettig opened 4 months ago

cboettig commented 4 months ago

Proposed change

This is a really fantastic plugin, especially for teaching. Would it be possible to integrate this more tightly into the Jupyter environment / Jupyter git extension? Ideally, I'd like to see the gh-scoped-creds run instead of the standard authentication prompt in the plugin (perhaps only for https-type remotes). Or maybe it is possible to register this as a git credential manager?

This would create a more seamless experience, similar to environments such as gitpod, where if a user seems to push a commit using the vscode integrated git menu, they are prompted with the device login.

The current situation for Jupyter + gh-scoped-creds is much less smooth. Students must manually run gh-scoped-creds first -- this looks out-of-place in a reproducible notebook (source code does not generally also include such git auth commands), and can be confusing for students to run from the bash shell. When using the GUI git plugin to push code to github, students will be prompted for user name and password --- their instinct is that they should do what the computer says, not decide that the computer is wrong, quit out of the commit menu, and run gh-scoped-creds first.

Who would use this feature?

I think this would particularly benefit students and instructors, or anyone who does not use git primarily from the command-line already.

(Optional): Suggest a solution

I think you can register custom credential helpers with git? https://git-scm.com/docs/gitcredentials#_custom_helpers

welcome[bot] commented 4 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada: