How to generate key-pair to access git repository

 Generate Key pair to access git repository

Windows:

  1. Open power shell and type following bellow given command.

  • ssh-keygen -t rsa -b 2048
  • -t mean type
  • rsa is a type
  • -b means byte
  • 2048 bytes


  1.  After entering the command it will ask few questions mentioned in screen shot below
  2. Open the file having key pair. mentioned below in screen shot

  1. Now key-pair is created, public key is a key with p sign.
  2. open the file and select the whole text. mention below in snap shot

  1. Upload public key to git hub to access the repository
  2. Go to github, under your profile icon, select settings
  3. In settings, on left select SSH AND GPG keys

  1. select and Add new SSH key 

  1. Now public ssh-key is successfully added on github and private is already on your system

  1. Now you can clone the repositories on this account where you added the public ssh-key.









Comments

Popular posts from this blog

MySQL Docker Container Setup And Configuration On Windows 10

AWS Server-less Application Model (SAM) and cloud formation Stacks

Create a VPC resource using terraform