Follow this tutorial: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
Your git config is similar to this:
git config -l
[email protected]
user.name=lotusirous
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/lotusirous/your_repository.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
Then, you change repo protocol variable remote.origin.url
from https to ssh. Thanks to this answer: https://stackoverflow.com/questions/1595848/configuring-git-over-ssh-to-login-once
git config remote.origin.url [email protected]:your_username/your_project.git