![]() The documentation may tell you to use pbcopy or some other command line tool to copy the SSH key contents to your clipboard. Instructions on how to add the public SSH key to your account can be found in the git repo hosting providers documentation: This will allow you to link your git account to your local machine. Now that you have created a public and private SSH key, you need to add the public key (. Add Public Key to your hosting provider’s account # pub and a private key with no file extension. Note that two keys are generated by the ssh-keygen command: a public key, denoted by the file extension. Upon confirming the passphrase, you will see confirmation that the key has been created and its location. You can opt to leave this empty by pressing enter, however, you should try and add a phrase for extra security in case your key gets compromised. ![]() Once you select a file name and press Enter you will be asked to set a passphrase. Make sure you add the ~/.ssh/ (or C\Users\user\.ssh\ for Windows) prefix to your filename so the key is correctly added to the. ![]() This will make it easier to keep track of the relevant SSH key when you set up multiple profiles. For example, ‘work’, ‘personal’ or using some sort of differentiating alias. I would recommend naming the file with the name of the account you are creating. You can either accept the default file name (id_ed25519) or you can specify a more meaningful name. The following output (or similar) will be displayed: Generating public/private ed25519 key pair.Įnter file in which to save the key (/Users/jw/.ssh/id_ed25519): For example, the relevant account email address for the account. Change the comment to something meaningful for the git account you are setting up. To generate an SSH key, open your terminal or command prompt and submit the following command. Generating a SSH key is done via the command line and is independent of the git hosting provider. To authenticate using SSH you first need to create a SSH key for each account. fine-grain access control and expiry dates). Note: you can set up personal access tokensįor HTTPS authentication which provide some of the benefits of SSH keys (e.g. SSH keys are useful not just for git authentication but also for accessing virtual machines on cloud providers etc. Taking the time to understand and use SSH keys will make your life easier in the long run.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |