ls -al ~/.ssh
ssh-keygen -t rsa -b 4096 -C "[email protected]"
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub
Go to your GitHub profile → Settings → SSH and GPG Keys → New SSH Key. Paste your public key and save it.
ssh -T [email protected]
it will show Hi ! You've successfully authenticated, but GitHub does not provide shell access.
git remote -v
git remote set-url origin [email protected]:/.git
git push origin