- Generate key if not exists :
<Recommend if root> ssh-keygen -t rsa -b 4096 -C "<git hub logon mail>"
- Start ssh-agent : eval `ssh-agent -s`
- Add ssh key to ssh-agent ssh-add test.rsa
- Add key to github: User -> Setting -> SSH and GPG keys -> Add key
- Test key works: ssh -T git@github.com
- Edit remote repository url:
Command: git remote set-url origin git@github.com:<Name>/<Repostory Name>.git
- It should be work, try commit now!