![]() ![]() You can enter any email you want, it does not have to be your GitHub account or it can even be a random string. The last part, which in this example is filled with an email address, is a comment. Here’s the command you use: ssh-keygen -t rsa -b 4096 -C " " You generate a new SSH key using the command ssh-keygen, which is available on all macOS, Linux and modern Windows computers with the Linux subsystem or the Git for Windows package. If you lose the private key, you’ll have to regenerate a new private/public key pair, as the authentication cannot be successfully completed without the private key part. ![]() You should never share the private key anywhere. pub file contains the public key, while the other file contains the private key which should never be shared anywhere. If you have existing keys you’ll notice that they sit in pairs, one file and another similarly named ending with. You can list all your SSH keys by typing ls -al ~ /.ssh You can have more than one key in there, because SSH keys are used for things other than Git. SSH keys are stored in the ~/.ssh folder. Most GUI-based clients like GitHub Desktop will handle this for you, but sometimes you need the command line, and so it’s very useful to have a SSH key setup in place.Īlso, sometimes you’ll need an SSH key to do useful things like pulling a repository on a remote server. ![]() When working with Git using the command line, the most common way to handle authentication is through the use of SSH keys. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |