Ubuntu has git installed by default. Generating an ssh key that can be used by the git warehouse requires two steps:
1. Set user.name and user.email of git
2. Generate ssh key through command
1. Set user.name and user.email of git
git config --global user.name "xxx"
git config --global user.email "[email protected]"
2. Generate ssh key. The simple way is to press Enter directly.
ssh-keygen -t rsa
3. View the generated ssh key for copying
cat ~/.ssh/id_rsa.pub