Skip to content

Latest commit

 

History

History
18 lines (9 loc) · 1.76 KB

sw_development.md

File metadata and controls

18 lines (9 loc) · 1.76 KB

How do i generate a ssh key for my github account?

You can generate a SSH key for your GitHub account by following these steps:

  1. Open the terminal: If you're using a Mac or Linux, open the Terminal application. If you're using Windows, you can use the Git Bash terminal or the PowerShell terminal.

  2. Generate a new SSH key: Type the following command into the terminal: ssh-keygen -t ed25519 -C "[email protected]". This command generates a new SSH key with the ed25519 algorithm, using your email address as a label.

  3. Choose a file name and location: The command will prompt you to choose a file name and location for the key. You can use the default location by pressing Enter or specify a different location.

  4. Choose a passphrase: The command will prompt you to choose a passphrase. A passphrase is like a password for your SSH key, so choose something secure and memorable. You can also leave this blank if you don't want to use a passphrase, but it's not recommended.

  5. Add your SSH key to the ssh-agent: Type the following command to add your SSH key to the ssh-agent: eval "$(ssh-agent -s)" and then ssh-add ~/.ssh/id_ed25519. This command adds your SSH key to the ssh-agent so you don't have to enter your passphrase every time you use it.

  6. Add your SSH key to GitHub: Copy the contents of your public SSH key by typing cat ~/.ssh/id_ed25519.pub and then select and copy the output. Then, go to your GitHub account settings and select "SSH and GPG keys". Click on "New SSH key" and paste the contents of your public key into the "Key" field. Give the key a descriptive title and click "Add SSH key".

By following these steps, you can generate a SSH key for your GitHub account and use it to securely connect to GitHub repositories.