Almost every Git Repo service (like Github, Bitbucket, GitLab, etc. ) supports SSH while doing git commands through CLI. Besides security, another biggest benefit of using SSH is to save the time for username and password.
However, if your machine is not set up correctly, you may encounter this issue.
Here is how to do a “easy-fix”.
Basically, it is because the remote Git Repo server could not authenticate you with any of the keys that are stored in your local machine.
If you run
ssh -Tv firstname.lastname@example.org, it will list the details on how the process is checking each SSH key pair. From this list, you will find out that – it ONLY check the pair with the name id_rsa. If you have any one with a customized name, it will load any more~~~
So, to fix it, simply copy the right public SSH key by
pbcopy < ~/.ssh/id_rsa.pub and add it to Git Repo server. Then you should be ready to go this time.
If needed, you may delete the “related” entries (the domain and IP of the Git Repo sever) from the file