ls -a -l ~/.sshIf id_rsa and id_rsa.pub are present, that means SSH keys are already present. If not then only add new SSH Keys.
ssh keygen -t rsa -b 4096 -C "{email-id}@gmail.com"Press Enter every time.
cat ~/.ssh/id_rsa.pubCopy selected text and add it to GitHub. Follow these steps:
- Click Profile Icon
- Select Settings
- Select SSH and GPG Keys
- Click New SSH key
- Add Title and Copy all the contents of
catcommand - Submit Add SSH Key
ssh -T git@github.comcd {my-git-repository}eval $(ssh-agent -s)Note: Make Sure that the SSH Keys are already created.
ssh-add ~/.ssh/id_rsagit remote add origin https://github.com/{username}/{my-git-repository}.gitssh -T git@github.comThen type yes to confirm.
git push -u origin master