The following setup should take no more than 20 minutes to complete, assuming that you are not dealing with a dial-up internet connection!
- Make sure that you have access to port 443 for github ssh operations (have your network admins open this up for the course if necessary, to avoid any unecessary complications)
- VS2013/2015 - I'm using VS 2015 Community Edition
- Git
- Ruby
- MingW
The following is the setup that you WILL need to perform to configure all necessary prerequisites to be able to enjoy the course. If you have any questions, please do not hesitate to contact me
Make sure that you have configured windows to show all hidden files and folders
- Open up windows explorer and navigate to your C:\ drive
- Create a new folder at the root of C:\ called utils (all lowercase). All of the tools we will install for the course will go into here.
Get setup at Github
- Sign up for a free account at github.com. My recommendation is to use an all lowercase username.
-
Install Ruby, yes the specific version in this link, not the newest.
-
Configure according to the following screenshots:
- Once the install has completed, verify your installation by opening up a command prompt and typing in: ruby -v. You should see:
- ruby 2.2.6p369 [version and date information]
- Install the Git for windows from here
- Configure according to the following screenshots:
-
Open up a git bash prompt
-
Enter the following command:
ssh-keygen -t rsa -C your_email_address
Accept the defaults for the remaining prompts (leave the passphrase blank).
-
Navigate to the folder where your ssh key was created (by default your profile ssh folder C:\Users\your_user_name\.ssh)
-
Open the file id_rsa.pub and copy the contents to the clipboard.
-
Login to your account at github.
-
Navigate to your ssh settings
-
Click on the Add SSH Key Button
-
Give your key a title and paste the public key that is in your clipboard from step 4 into the Key text entry:
-
Open up a git bash prompt
-
Enter the following command:
ssh -v git@ssh.github.com
-
If prompted to cache the server identity, type yes.
-
If you have setup your ssh settings correctly the bottom part of the command output should look similar to the following:
- Open up a git bash prompt and type the following commands:
cd /c
mkdir course
cd course
git clone https://github.com/trimble-april-2017/setup.git [enter]
At the completion of the last command you should have a copy of this repository on your local machine.
Open up a git bash prompt and type the following commands:
cd /c/course/setup
explorer .
Double click the mingw-get-inst-20111118.exe installer and install using the following screenshots:
The following steps will ensure that you have your git environment setup correctly for the class. If you already have existing git configuration that you use on a regular basis, either make your changes manually to match the recommended settings, or create a backup of your existing configuration and restore it after the class.
Open up a git bash prompt and type in the following commands:
cd /c/course/setup
gem uninstall bundler # Answer yes to any prompts if you are prompted
gem install bundler
bundle install
thor setup
Upon running the last command you will be prompted to make changes to a settings file that has been generated based on your username. It should be in the root of this repo folder with the name [ your-logged-in-name-without-spaces-or-path-symbols-all-lowercase ].settings.
Open up your settings file in your favourite text editor and make sure all of the settings are correct. If you have followed along correctly to this point (by using the specified install paths and key generation procedure etc), the only settings you should need to change are in the git section of the configuration file. Change the following:
- name
Take a look at the sample_settings file in this directory, if you are unsure how to make the changes. It uses fake values for the values you need to change.
If you deviated from the recommended setup you will have to tweak extra settings as needed. The config file is fairly self explanatory, so hopefully you can figure it out if you made your own custom changes. Make your change(s) and save the file.
Continue to rerun the following command:
thor setup
This task will do the following:
- Setup a sane ~/.gitconfig that contains the email you provided and your name, along with some other aliases and a setting that is essential for our work during the course.
- Copies some basic bash dotfiles into your home folder, this correctly sets up the ssh agent to use the key you generated/provided earlier.
- Configures the mingw path
-
Open up a git bash prompt
-
Enter the following command:
ssh -v github
-
If prompted to cache the server identity, type yes.
-
Once again, the command output should look similar to the following:
Open up a git bash prompt and type the following:
ruby -v
You should see a ruby version, if you don't see anything you may need to repeat the steps above as you may have missed a step.
- Login to your account at github
- Navigate to the following url: http://github.com/trimble-april-2017
- Click on the prep repository:
- Click on the fork button to create your own copy of this repository
-
Open up a git bash prompt and type the following commands:
cd /c/course git clone github:[your github user name]/prep.git
Assuming your github username is jp the commands would look as follows:
git clone github:jp/prep.git
-
Once you have completed cloning the repositories your course folder should look as follows:
- Follow the readme of the prep folder to finish remaining setup