Generating SSH Key
SSH Key is use for authentication.
Step 1: Check if you already have SSH key
- Open Git Bash.
- Enter ls -al ~/.ssh to see the existing SSH Keys
Step 2: Generating a New SSH Key
- Open Git Bash
- Past the below command and use your mail id .
- ssh-keygen -t rsa -C “email@example.com”
- It is asking for file name , do not enter any thing just hit Enter key it will create file with default name.
- Enter Password
- Enter same Password again and hit Enter
- Key Generated.
Step 3 : Get the generated SSH Key
- Run the below command to get key
- notepad .ssh/id_rsa.pub [it will open the file in notepad from where you can copy your key for next step.]
Step 4: Add SSH key into Git hub
- login into git hub
- go to settings [setting can be found under the menu at top right corner your image drop-down menu ]
- go to SSH and GPG Keys
- Click Add New SSH Key
- Enter title and paste the key which we have copied from last step.
- click Add SSH Key