Introduction
In this article I'll say about how to create a new ssh key and provide it on cloud for to be safe in our applications and softwares. It's can became easily for make safely connections remotely from your machine as git pull/push.
Get started
- Open the terminal and paste the text below, substituting in your GitHub email address.
$ ssh-keygen -t ed25519 -C "your_email@example.com"
Note: If you are using a legacy system that doesn't support the Ed25519 algorithm, use:
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
It creates a new SSH key, using the provided email as a label.
Generating public/private algorithm key pair.
- When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.
Enter a file in which to save the key (/Users/you/.ssh/id_algorithm): [Press enter]
At the prompt, type a secure passphrase. For more information, see "Working with SSH key passphrases."
> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]
Notes:
In the terminal, access until to path /.ssh
and then run commands there. Also it’s important to say that email from first command generation is you personal account of Github.
Its there is’t need typing password because we will use pull request only, and not push.
In the Github, you can put empty title for create key.
https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key
Adding a new SSH key to your GitHub account
How to Clone a Specific Branch
git clone --branch <branchname> <remote-repo-url>
Top comments (0)