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

Document compatibility with git #62

Open ryanlovett opened 1 month ago

ryanlovett commented 1 month ago

Proposed change

(I'm not sure if this should be a bug report or feature request.)

We installed gh-scoped-creds in a few different jupyterhubs and noticed that it wasn't working properly on one of them. Where it was broken, we were using the git provided by the OS, Ubuntu Jammy, while the working environments were using git from conda-forge. In the broken environment, when I installed git from conda, gh-scoped-creds worked properly.

jovyan@jupyter-me:~/some-repo$ /bin/git --version
git version 2.34.1
jovyan@jupyter-me:~/some-repo$ /bin/git push -u origin foo
Username for 'https://github.com/mygituser/some-repo.git': ^C

jovyan@jupyter-me:~/some-repo$ /srv/conda/bin/git --version
git version 2.45.1
jovyan@jupyter-me:~/some-repo$ /srv/conda/bin/git push -u origin foo
... operation completes ... 

Alternative options

Determine why git in Jammy does not work? Perhaps the issue is specific to that version, or perhaps it is specific to some in-between version of git and earlier.

Who would use this feature?

People who prepare singleuser hub environments. People who configure their own environments on hubs.

(Optional): Suggest a solution

yuvipanda commented 1 month ago

https://github.com/conda-forge/git-feedstock/issues/113 Is related and should explain the behavior i think

ryanlovett commented 1 month ago

In our case, the git from Ubuntu/apt is not working while the one from conda is. However that issue let me to test running

GIT_CONFIG_NOSYSTEM=1 /bin/git push ...

and that worked! /etc/gitconfig was set for a specific repo in fact, so this is a mistake on my part. So I might change the title of this issue to "Document role of /etc/gitconfig" or just close it. What do you think?

yuvipanda commented 4 weeks ago

Ya i think we should document the location of the gitconfig and specifically point to the conda location being different