berkeley-dsep-infra / datahub

JupyterHubs for use by Berkeley enrolled students
https://docs.datahub.berkeley.edu
BSD 3-Clause "New" or "Revised" License
62 stars 37 forks source link

Add gh-scoped-creds for dlab.datahub #5515

Closed aculich closed 7 months ago

aculich commented 7 months ago

Package Name

gh-scoped-creds

Hub URL

dlab.datahub.berkeley.edu

Course Name

For D-Lab workshops: https://github.com/dlab-berkeley/

Upcoming workshops: https://dlab.berkeley.edu/training/upcoming-workshops

Semester Details

D-Lab workshops run year-round (including summer)

Installation Deadline

Whenever it fits into your workload while also configuring it for other courses like @cboettig's ESPM 157, ESPM 288 in #5513

We have folks who will use it right away, and if there's anything about it you'd like D-Lab staff and grad students to help test, we'd be happy to before you implement it for other courses.

Likely we'll update our existing D-Lab workshop about using git, and will include how to use gh-scoped-creds in that workshop (see this past description): https://dlab.berkeley.edu/events/bash-git-introduction/2023-10-24

balajialg commented 7 months ago

@aculich gh-scoped-creds is enabled in https://dlab-staging.datahub.berkeley.edu. It will be deployed to prod in the next few hours. Let us know how it works

cboettig commented 7 months ago

this is so nice! My students are gonna love this.

balajialg commented 7 months ago

@cboettig That's great! Once @aculich tests gh-scoped-creds and gives a thumbs up, I will replicate the same for your course

balajialg commented 7 months ago

@aculich Closing this issue since the request got resolved via #5536. Please test the gh-scoped-creds workflow and reopen this issue if the are problems pushing to a git repository

cboettig commented 7 months ago

@balajialg ah, ok we did discover one wrinkle here. When students are using the RStudio interface, the GH_SCOPED_CREDS_CLIENT_ID environmental variable and GH_SCOPED_CREDS_APP_URL aren't visible on the terminal or the R session because RStudio insists on ignoring global env vars unless they are echoed into Renviron (e.g. into $R_HOME/etc/Renviron.site). Is there a way to do this?

Currently students have to access this from the /lab/ endpoint (which is fine with my grad students where we go back and forth between the jupyter hub and rstudio interface, but my undergrads don't know /lab/...)

balajialg commented 7 months ago

@cboettig Sorry, I was out last Friday! I see that you are already in touch with @ryanlovett regarding this issue - https://github.com/jupyterhub/jupyter-rsession-proxy/issues/145. I will wait for Ryan's inputs and replicate his suggestions for R hub.