You should be comfortable running shell commands and familiar with the basics of GIT. GIT is a distributed Version Control System(VCS). This allows non-linear development of projects and can handle large amount of data effectively by storing it on Local Server.
Step 1: Install Git
1
|
|
sudo –> for administrative previlages.
apt-get-> Package Installer, puts stuff from repositries and install them.
Now it’s time to configure your settings. To do this you need to open an app called Terminal.
- USERNAME :– First you need to tell git your name, so that it can properly label the commits you make.
1 2 |
|
- E-Mail :– Git saves your email address into the commits you make. We use the email address to associate your commits with your GitHub account.
1 2 |
|
- To see all settings :–
1
|
|
Step 2: Install RVM
RVM is Ruby Version Manager.It allows us to install and manage different versions and implementations of ruby on one computer including ability to manage different sets of Ruby gems on each.Thus, allowing to test our application with different versions of ruby setups.
Run the following command from your terminal.Be sure to follow any subsequent instructions as guided by the installation process.
1
|
|
The above command will install both RVM and the latest version of Ruby. curl is a client to get document/file or send to server using any of supported protocols.
If the above command produces an error, run following command from ypur terminal to achieve the same.
1
|
|
Step 3: Install Ruby 1.9.3
1 2 3 |
|
Gems contain package information along with files to install RubyGems.It is a package manager which became part of the standard library in Ruby 1.9. It allows developers to search,install and build gems, among other features. All of this is done by using the gem command-line utility.
- Run ruby – -version to be sure you’re using Ruby 1.9.3. If you’re having trouble, run the following command on your terminal to set your default version of ruby-1.9.3
1
|
|
If ruby —version doesn’t say you’re using Ruby 1.9.3, revisit your RVM installation.
Step 4: Setup Octopress
1
|
|
The above command replaces octopress with username.github.com.
- Next we need to change current working directory to octopress.
1 2 |
|
- Next, install dependencies.
Using Bundler to manage your gem’s dependencies is also pretty easy.Bundler is a program for managing gem dependencies in your Ruby projects. With Bundler you can specify which gems your program needs.
1
|
|
This should be the only gem you need to install yourself should all your programs’ dependencies be managed by Bundler.
- Now,Install the dependencies specified in your Gemfile
1
|
|
- Install the default Octopress theme.
1
|
|
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax. A rake file is a collection of tasks, when you call rake with an argument (in this case install) that’s the task that get’s executed.
Step 5: Deploying with Github User/Organization Pages
Creating Github User/Organization Pages
Create a new Github repository and name the repository with your username.github.com or organization.github.com.
Switch over to new repository created in previous step. Click on Settings Tab , scroll down to Github pages and click on “Automatic Page generator” button.
Author your content in the Markdown editor.
Click the Continue To Layouts button.
Preview your content in our themes.
When you find a theme that you like, click Publish
Generating SSH – keys
We can use SSH keys to establish a secure connection between your computer and GitHub. To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter
1 2 3 4 |
|
Now you need to enter a passphrase.
1 2 |
|
1 2 3 4 |
|
Add your SSH -key to GitHub
Go to your Account Settings.
Click “SSH Keys” in the left sidebar.
- Click “Add SSH key”
- Paste your key into the “Key” field.
- Click “Add key”.
- Confirm the action by entering your GitHub password.
To make sure everything is working you’ll now SSH to GitHub. When you do this, you will be asked to authenticate this action using your password, which for this purpose is the passphrase you created earlier.
1 2 |
|
You may see this warning:
1 2 3 |
|
Don’t worry, this is supposed to happen. Verify that the fingerprint matches the one here and type “yes”.
1 2 |
|
If that username is correct, you’ve successfully set up your SSH key. Don’t worry about the shell access thing, you don’t want that anyway. If Not correct ,To Add Authenticity and again check Authenticity.
1
|
|
- Github Pages for users and organizations uses the master branch like the public directory on a web server, serving up the files at your Pages . As a result, you’ll want to work on the source for your blog in the source branch and commit the generated content to the master branch. Octopress has a configuration task that helps you set all this up.
1
|
|
This will Ask you for your Github Pages repository url.
Next run: This will generate your blog, copy the generated files into _deploy/, add them to git, commit and push them up to the master branch. In a few seconds you should get an email from Github telling you that your commit has been received and will be published on your site.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|