coursera / coursera-labs

Apache License 2.0
18 stars 24 forks source link

Git in lab fixes #25

Closed josephl310 closed 3 years ago

josephl310 commented 3 years ago

Summary

We're currently facing a number of issues related to supporting git in our labs, including:

  1. git config settings not persisting, causing learners to have to enter their information/credentials after every forceRefresh
  2. forceRefresh changing file permissions to a+rwx, causing git to show all files affected as having staged changes (even though git diff might show nothing
  3. logging into github via the code-server github authentication dialogue leads to 404

Solutions:

  1. Fixed by making ~/.gitconfig and ~/.git-credentials symlinks of files with the same name inside a mounted path
  2. Fixed by adding a git config option that ignores file permissions changes
  3. Updated to code-server v3.8.1 which includes a fix for this issue

Test Plan Local docker builds to verify that .gitconfig and .git-credentials are indeed created. Upload to coursera platform to verify that these files still persist even after forceRefresh, and that users will no longer have to keep re-entering their git information.