Skip to content

Instantly share code, notes, and snippets.

@mapix
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save mapix/eddf32464e79575df89d to your computer and use it in GitHub Desktop.

Select an option

Save mapix/eddf32464e79575df89d to your computer and use it in GitHub Desktop.

Authentication

.netrc (for svn)

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

     machine ecesvn.uwaterloo.ca login <USERNAME> password <PASSWORD>
    
  2. 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)

  1. Create a password-less SSH key for use for mirroring

    $ ssh-keygen -f ~/.ssh/id_rsa_os499_github
    
  2. 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
    
  3. 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
    
  4. Set the correct permissions on ~/.ssh/config

    $ chmod 0600 ~/.ssh/config
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment