Connecting to ‘Git’ remote repositories (original) (raw)

Setup steps (do this only once)

The ‘Bitbucket’ website has cosmetic differences from ‘GitHub’, but works similarly. Steps 4 and 5 of the setup vignette can be applied nearly without alterations. To connect worcs to ‘Bitbucket’, I proceeded as follows:

  1. Register on Bitbucket
    • Go to the Bitbucket website and click Get started for free. Follow the steps to create your account. Sign in.
    • Bitbucket has largely automated the process of awarding free academic upgrades. If your email address is not recognized as belonging to an academic institution, you can fill out a form to request this upgrade manually.
  2. Connect ‘RStudio’ to Git and Bitbucket (for more support, see Happy Git with R
    1. Open ‘RStudio’, open the Tools menu, click Global Options, and click Git/SVN
    2. Verify that Enable version control interface for RStudio projects is selected
    3. Verify that Git executable: shows the location of git.exe. If it is missing, manually fix the location of the file.
    4. Click Create RSA Key. Do not enter a passphrase. Press_Create_. A window with some information will open, which you can close.
    5. Click View public key, and copy the entire text to the clipboard.
    6. Close ‘RStudio’ (it might offer to restart by itself; this is fine)
    7. Go to the Bitbucket website
    8. In the bottom left of the screen, click the circular icon with your initials. Select Personal settings
    9. On the settings page, click SSH Keys in the left sidebar
    10. Click Add key
    11. Copy-paste the public key from your clipboard into the box labeled_Key_, and give it a label. Click the _Add key_button.
    12. Open ‘RStudio’ again (unless it restarted by itself)

Connect new worcs project to ‘Bitbucket’

To create a new project on ‘Bitbucket’, go to your account page, and click Create repository in the middle of the page. These steps differ somewhat from the procedure for ‘GitHub’: