WaiveCar / WaiveScreen

WaiveScreen related stuff.
0 stars 0 forks source link

Repository Split and Clean #269

Closed nthobe closed 4 years ago

nthobe commented 4 years ago

The server code has been split out and moved into a new repository: WaiveCar/Ijiraq

The server code needs to be removed from this repo along with any secrets. We will be doing this with a git filter-branch which will rewrite most of the commits. This will not work with the git commands in our current upgrade system.

So, we will be pushing out an interim update that updates the update mechanisms.

nthobe commented 4 years ago

The first stage upgrade is implemented in branch pre-prune-release.

Gameplan:

The cleansing process will be something along the lines of:

git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch Linux/keys/ScreenAccess Products AdDaemon Admin MadisonAve payments.py email_service.py' --prune-empty --tag-name-filter cat -- --all
git push origin --force --all
git push origin --force --tags
nthobe commented 4 years ago

Proposed cleaning commands:

git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch Linux/keys/ScreenAccess products Products AdDaemon Admin madisonave MadisonAve reef-demo adcast models payments.py email.py email_service.py Email server status static scss linux/dot_ssh/phoneHome Linux/dot_ssh/phoneHome Linux/fai-config/files/dot_ssh/phoneHome Linux/fai-config/files/home/dot_ssh/phoneHome Linux/fai-config/files/home/.ssh/phoneHome' --prune-empty --tag-name-filter cat -- --all

git for-each-ref --format="delete %(refname)" refs/original | git update-ref --stdin
git reflog expire --expire=now --all
git gc --prune=now

git push origin --force --all
git push origin --force --tags

After that we contact GitHub Support asking them to remove cached views and references to the sensitive data in pull requests on GitHub.

nthobe commented 4 years ago

Final cleaning commands:

git clone --mirror git@github.com:WaiveCar/WaiveScreen.git
cd WaiveScreen.git

git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch Linux/keys/ScreenAccess products Products AdDaemon Admin madisonave MadisonAve reef-demo adcast models payments.py email.py email_service.py Email server status static scss .htaccess favicon.ico linux/dot_ssh/phoneHome Linux/dot_ssh/phoneHome Linux/fai-config/files/dot_ssh/phoneHome Linux/fai-config/files/home/dot_ssh/phoneHome Linux/fai-config/files/home/.ssh/phoneHome' --prune-empty --tag-name-filter cat -- --all

git for-each-ref --format="delete %(refname)" refs/original | git update-ref --stdin
git reflog expire --expire=now --all
git gc --prune=now

git push origin --force --mirror

This method seems to eliminate the problem with the removed commits remaining on github, so we shouldn't have to contact their support.

nthobe commented 4 years ago

The GitHub repo has been cleaned.