git --version #check git version
git config --global --list # check global setting of git
cat ~/.gitconfig #open global setting file
git config --global --unset user.name #erase global setting of the name
git config --global --unset user.email #erase the global setting of the emailStep 1: generate key
ssh-keygen -t rsa -C "<Your email address>"Step 2: It will create a pub file and put key into it. Please copy it and open github webpage open ssh&gpg keys then click new ssh and paste the key into it.
Step 3: Then add ssh locally by following the commands:
ssh-add ~/.ssh/id_rsa_<part of your file name>Step 4: Check whether it is successful.
ssh -T git@github.comHi yingchaoji! You've successfully authenticated, but GitHub does not provide shell access.
vim ~/.ssh/configExecute the following command to see if it is successful.
ssh -T git@tw
ssh -T git@wisersssh -T git@tw
git config --local user.name "yingchaoji"
git config --local user.email "yingchaoji95@gmail.com"