• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Featured
    • C# Tutorials
      • LinQ Tutorials
      • Facebook C# API Tutorials
    • PHP Tutorials
      • CodeIgniter Tutorials
    • Amazon AWS Tutorials
  • Categories
    • Programming
    • Development
    • Database
    • Web Server
    • Source Control
    • Management
    • Project
  • About
  • Write
  • Contact

CodeSamplez.com

Programming, Web development, Cloud Technologies

You are here: Home / Source Control / Github As Your Online GIT Repository

Github As Your Online GIT Repository

December 31, 2010 by Rana Ahsan Leave a Comment

github

I have already discussed about how to get started with git. After you know the basics, you might want to start your projects and may be finding a suitable git repository hosting for your project online. With very much confidence, I will suggest you to use github(I already mentioned about it on the previous article on reference section). This is currently the only one champion in git hosting. Others, which are exist, comparatively nothing. Here, I will show you including command line examples on how you can proceed with github.

Beginning with Github:

First, Register an get a account on github. You will come to know that, view here and understand that there are two kind of strategy to host your project there. One is free, you can host unlimited projects. But, those will be public, that means, anyone can get source code of those projects. This option is very good for open source projects and many renowned companies use github to host their official open source api projects. You could also consider Hostens for hosting services.

Create Repository And Verify Your Identity:

Although it is possible to create repository with command line argument, here won’t need this actually. Go with the easier way. On your ‘Dashboard’ tab on your github account, you will see an anchor link option with text ‘Create a Repository’, go with it. There you will have to enter the project name, and additionally you may enter description and homepage also(optional).

Now, you will have to verify your identity to github that you are the right owner of the account. For that, open your computer’s ‘Git Bash’ tool and use the following commands:

$ ssh-keygen -t rsa -C "yourgithubaccountemail@domain.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/current-directory-path):Enter Path Here
Enter passphrase (empty for no passphrase): Enter A Pass phrase
Enter same passphrase again: Confirm your pass phrase

Remember carefully to enter the only github account email as it will identify your account using that email. Moreover, If you are on the the correct directory, you can skip entering path. Also, you can skip the pass phrase part also just by hitting enter.

After completing this steps successfully, a new file named ‘id_rsa.pub’ will be created in the directory. There you will get a key. Copy that, go to your github account’s ‘Account settings’ -> ‘SSH Public Keys’ -> Add a key, then paste the key. If you see any newline appended, you will may need to remove that, otherwise authentication may not work on later. To test, back to your ‘Git Bash’, use the following commands:

$ ssh git@github.com
The authenticity of host 'github.com (XXX.XXX.XXX.XXX)' can't be established.
RSA key fingerprint is XX:XX:XX......
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,XXX.XXX.XXX.XXX' (RSA) to the list of known hosts.
ERROR: Hi yourname! You've successfully authenticated, but GitHub does not provide shell access
Connection to github.com closed.

Starting Traditional Git Commands:

After completing the above primary stage, actually, we are all done for the github specific works. Now, we can start using our tradition way to execute git commands that i have discussed on my previous post, just you will need to remember all the times that you are using an remote server and will need to take the extra care(commands) that remote git server requires.

Further References:

Here I have showed the simplest and quickest way to get things done for github, but github already has details step by step instruction. Go through them if you are having some special problems. If still you are having issues, please comment here to let me know, I will try to help out my best. Happy coding 😀

Share If Liked

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pocket (Opens in new window)

You may also like

Filed Under: Source Control Tagged With: git, github

About Rana Ahsan

Rana is a passionate software engineer/Technology Enthusiast.
Github: ranacseruet

Reader Interactions

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 3,774 other subscribers

Follow Us

  • Twitter
  • Facebook

Top Posts & Pages

  • How To Work With JSON In Node.js / JavaScript
    How To Work With JSON In Node.js / JavaScript
  • PHP HTML5 Video Streaming Tutorial
    PHP HTML5 Video Streaming Tutorial
  • How To Work With C# Serial Port Communication
    How To Work With C# Serial Port Communication
  • Facebook C# API Tutorials
    Facebook C# API Tutorials
  • Using Supervisord Web Interface And Plugin
    Using Supervisord Web Interface And Plugin
  • Utilizing Config File In C#.NET Application
    Utilizing Config File In C#.NET Application
  • LinQ Query With Like Operator
    LinQ Query With Like Operator
  • Getting Started With UDP Programming in Java
    Getting Started With UDP Programming in Java
  • Generate HTTP Requests using c#
    Generate HTTP Requests using c#
  • How To Use Hotkeys/Keyboard Events In WPF Application Using C#
    How To Use Hotkeys/Keyboard Events In WPF Application Using C#

Recent Posts

  • Building Auth With JWT – Part 2
  • Building Auth With JWT – Part 1
  • Document Your REST API Like A Pro
  • Understanding Golang Error Handling
  • Web Application Case Studies You Must Read

Tags

.net angularjs apache api audio auth authenticatin aws c# cloud server codeigniter deployment docker doctrine facebook git github golang htaccess html5 http javascript jwt linq mysql nodejs oop performance php phpmyadmin plugin process python regular expression scalability server smarty socket.io tfs tips unit-test utility web application wordpress wpf

Footer

Archives

Follow Us

  • Twitter
  • Facebook

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 3,774 other subscribers

Copyright © 2023