• Blogs (9)
    • 📱 236 - 992 - 3846

      📧 jxjwilliam@gmail.com

    • Version: ‍🚀 1.1.0
  • github.com: generate SSH keys

    Blogs20122012-07-08


    github.com and SSH keys

    github.com access needs SSH keys permission. Here I list the process of generating ssh-key between my Unbuntu desktop and github.com remote server. Quite easy.
    In my Unbuntu desktop:

    $ cd $HOME
    
    # If ssh-keygen command doesn't exist, you need to apt-get install.
    $ ssh-keygen -t rsa
    
    # a new directory .ssh is generated.
    cd $HOME/.ssh

    There are 2 files generated in .ssh directory.

    1. id_rsa
      This is private key file which is kept locally
    2. id-rsa.pub
      This is the file need to sync in github.com and locally.

    Now copy contents in $HOME/.ssh/id_rsa.pub, and paste it in github: https://github.com/settings/ssh: Title: could be any string
    Key: copy the above context to here and save.
    After the authenication, now the following works:

    $ git remote add origin git@github.com/account_name/repository_name.git
    $ git push -u origin master