- Go to github profile
- Go to Profile settings
- Then click on SSH and GPG keys
- Open you mac terminal and Paste the text below, replacing the email used in the example with your GitHub email address
ssh-keygen -t ed25519 -C "your_email@example.com"
- After Run the command it show
- After that it generate SHA256
7.Start the ssh-agent in the background.
$ eval "$(ssh-agent -s)"
> Agent pid 59566
- Run
open ~/.ssh/config
If the file doesn't exist, create the file.
touch ~/.ssh/config
- Open ~/.ssh/config file, then modify the file to contain the following lines. If your SSH key file has a different name or path than the example code, modify the filename or path to match your current setup.
Text
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
- Run
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
If it show error like
Then run
ssh-keygen -t ed25519 -C Your_github_emailr@gmail.com
Then run
- Go to your git hub account and click on "New SSH key"
- Provide title and key.
- For "key" open .ssh > id_ed25519.pub
Now clone a project from your github repository
git clone git@github.com:KhairunNaharNowrin/End-to-End-Testing-With-Cypress.git
- Setup the project environment
- Run
git add .
git commit -m "set up environment"
It will show error like "Author identity unknown"
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
git push
reference -
Top comments (1)
Very useful, thanks!