Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

cbhl/os499-scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

OS 499 Scripts

Authentication

.netrc (for svn)

  • Create ~/.netrc with your WatIAM credentials to log into the SVN server

    machine ecesvn.uwaterloo.ca login password

  • Set the correct permissions on ~/.netrc (Note: This won't save you from untrusted sysadmins on that box.)

    $ chmod 0600 ~/.netrc

SSH keys (for git)

  • Create a password-less SSH key for use for mirroring

    $ ssh-keygen -f ~/.ssh/id_rsa_os499_github

  • Add the contents of the public key to a GitHub account with R/W access to the OS 499 repositories (presumably yours, although a separate bot account would theoretically do). (Don't forget the .pub. :)

    $ cat ~/.ssh/id_rsa_os499_github.pub

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFJoUl9JvSemQWZVMNlw8bT8WqUel+Lq90MIFg6uaFi8yn0QX8tT8YmDrh8g4pmIkX1vFuJCh2H397//Ff19QoLFze4kz5kRpML8qniW2SF/qmGyKn34PaUnhAuoJPFXiNq3JcIg8Qx8wdwNMpSjUvMGemFcwZYgGUDdwhsu1pV7tz47fDNcBW9WSl+bO0rG+xNFWMALiaVb71s8mqjCjiPoQVJblvyE0iuBdhk8kY7IaiFUx/b73BWS2elfpmLCvtMoo0DKVF4elo5YcirllD6IMqO44YYkjQRdYngaz5gmbXGLOJKD5P+WouTKcH08Oww2VhJwrsfTbb2AKGprTJ michael@paprika

  • Create or amend ~/.ssh/config to enable automated login with the correct key

    Host os499mirror User git Hostname github.com IdentityFile /home/michael/.ssh/id_rsa_os499_github

  • Set the correct permissions on ~/.ssh/config

    $ chmod 0600 ~/.ssh/config

Creating a Repository

Dependencies

On recent verisons of Ubuntu (tested on 11.10 as of the time of writing),

$ sudo aptitude install subversion git git-svn

Note that git used to be called git-core on older Debian-based distributions. For other distributions, YMMV.

Create "repository" in SVN

  • NB. This just creates a folder under the single master os499 repository. (FIXME: Perhaps there is a way to make a proper "child" repository; if so, need to see if it's appropriate for our use.)

  • Check out os499 from ecesvn

    $ mkdir ~/svn/ $ cd ~/svn/ $ svn co https://ecesvn.uwaterloo.ca/courses/os499

NOTE: The SVN repository was initially located at [https://ecesvn.uwaterloo.ca/people/os499][] .

  • Make the new "repository" (called scripts here); add a README file. (Markdown for illustration because that's what this file uses.)

    $ cd os499 $ mkdir scripts $ mkdir scripts/trunk $ touch scripts/trunk/README.markdown // ... vim scripts/trunk/README.markdown (optional)

  • Commit to SVN (this pushes to the server at the same time)

    $ svn add scripts $ svn commit

Set up mirror on GitHub for non-public repos

Note that if the repo is public, you can just use GitHub's mirroring feature.

Keeping a Repo Mirror Up-to-Date

SVN -> Git

$ git svn rebase --authors-file=svn.authors
$ git push origin master

Git -> SVN (FIXME)

$ git pull origin master
$ git svn dcommit

Changes in both locations (FIXME)

$ git svn rebase --authors-file=svn.authors
$ git pull origin master
// ... resolve merge issues in Git
$ git push origin master
$ git svn dcommit

SVN URL changes (FIXME)

Crontab

TODO

Jekyll

TODO

Further Reading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published