Just enter the passphrase when the CLI prompts. You can use a passphrase, for the SSH key being generated. ssh-keygen -t rsa -b 4096 -C "YOUR_GITHUB_EMAIL_ADDRESS" To create a new SSH key, run the following command substituting in your GitHub email address. If you receive an error that ~/.ssh doesn't exist, don't worry! We'll create that folder by generating a new SSH key Generate a new SSH key If you don't have an existing public and private key pair, or don't wish to use any that are already available to connect to GitHub, then see the below steps to generate a new SSH key. To check if there are any existing SSH keys on your PC: ls -al ~/.ssh Setting up SSH keys First check if there are any keys I recommended to config the line endings and case sensitivity for file names using git config -global tocrlf true and git config -global core.ignorecase true. You can verify the configured username and email using the following commands git config -global user.name git config -global user.name "YOUR_USERNAME" git config -global user.email "YOUR_EMAIL_ADDRESS" Testing the config This can be user name and email address with which you want to make commits. Configure basic user infoįirst you need to tell git your user name and email address. I recommend to delete all your personal access tokens from your account, visit Tokens and delete all. And now that you started using SSH keys, never use your password unless you login in browser. Note: All of the following commands are to be run in Git Bash. And the process will be similar for any other services like Gitlab/Bitbucket also. In this post I will walk you through the setup of SSH keys for your GitHub account. Using SSH key is highly recommended and followed by professional developers often. If you want to use Git without using password, then SSH key is the solution. Use GitHub with SSH - Complete guide including VSCode setup
0 Comments
Leave a Reply. |