Hands-on Outline

  1. Git
  2. GitHub and GitLab and Bitbucket

    • Duke’s GitLab
  3. Markdown
  4. Orchestrating with RStudio

    • Masks the CLI
    • Easier to get started
    • Power Users can still use commands

Prerequisites

Load & Install Software Before the Workshop

To complete the hands-on portion of the workshop you’ll need software pre-installed. Due to the nature of the workshop we will not have time to troubleshoot installations during the workshop. Please be sure to perform the following steps on the laptop you bring to the workshop.

Required Software

Download and install

I recommend accepting the install defaults for the following:


Click on the link to your OS




If you haven’t yet, install each of the above applications.

Duke’s GitLab – Verify your NetID Access

During the workshop we will use Duke’s GitLab. To complete the hands-on portion of the workshop, you must log-inin advance of the workshop – and ensure you have NetID access to https://gitlab.oit.duke.edu. If you do not have access to Duke’s GitLab, contact OIT.

  • Be certain you log-in via “Duke Shibboleth Login” using your NetID


Generate SSH keys in Advance of the Workshop

I recommend generating your SSH keys in advance of the workshop. Then add your public key to Duke’s GitLab. To do so, you should have already installed Git to your laptop.

We will cover key configuration in the workshop although you will find the explanation easier to follow if you generate and add your keys in advance. The instructions below are based on those found at Duke’s GitLab. If the instructions below are not clear you should consult the more complete GitLab instructions

  1. To begin, open the Terminal in RStudio. If you’re using the latest version of RStudio, the Terminal is a tab in the console quadrant (typically the bottom-left)

    • In RStudio: Menubar Tools > Terminal > New Terminal


  1. Determine if you already have an SSH key pair. In the Termnal tab, type: cat ~/.ssh/id_rsa.pub

    • If you see a string starting with ssh-rsa you already have an SSH key pair and can simply copy that key (Step 5)

    • If you get some kind of error, you’ll have to generate a key in the next step (Step 3)

  2. In the Terminal tab, type: ssh-keygen -t rsa -C "your.email@example.com" -b 4096

    • Use your Duke Email address
  3. You will be prompted to input a file path. i.e. the location where you’ll save your SSH key pair.

    • If you don’t already have an SSH key pair use the suggested path by pressing enter

    • After setting the file path you will be prompted to input a password. This will secure your SSH key pair. It is a best practice to use a password for an SSH key pair, but it is not required. You can skip creating a password by pressing enter

      • Note: If you want to change the password of your SSH key pair, you can use ssh-keygen -p <keyname>
  4. Copy the public SSH key to the clipboard buffer

    • In the Termnal tab, type the appropriate code below:
      • macOS: cat ~/.ssh/id_rsa.pub | pbcopy
      • Windows: cat ~/.ssh/id_rsa.pub | clip
  5. The final step is to add your public SSH key to GitLab.

    • Navigate to the SSH Keys tab in your Profile Settings. Paste your key in the Key section and give it a relevant Title. Use an identifiable title like Work Laptop - Windows 7 or Home MacBook Pro 15.

    • If you manually copied your public SSH key make sure you copied the entire key starting with ssh-rsa and ending with your email.

 
R We Having Fun Yet‽ -- Learning Series
Data & Visualization Services
Duke University Libraries
C bn
Shareable via Creative Commons: CC By-NC