In this tutorial, you learn how to generate SSH key for GitHub and clone your GitHub repository in AWS ubuntu server with SSH command.
- Generate SSH key and add the SSH key
~ ssh-keygen -t ed25519 -C "email@example.com" ~ eval "$(ssh-agent -s)" ~ ssh-add ~/.ssh/id_ed25519
- Copy the newly generated SSH Key and add the SSH key to your GitHub account.
~ cat ~/.ssh/id_ed25519.pub
Now you can initialize git in your project directory and add GitHub repository with SSH command. And you can manage the code with git command.