Set up a custom ssh identity
ssh-keygen -t ed25519 -C "[email protected]"
Add custom identity key to terminal to avoid Key not found error
## Error
> git clone ssh://[email protected]/cicd.git /Code/cicd --progress
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Solution
ssh-add ~/.ssh/id_my_custom_id
Identity added: /Users/ed/.ssh/id_my_custom_id ([email protected])
References:
- https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
- https://stackoverflow.com/a/35418263