Table of Contents
git pull via ssh public key
If using for example 'myuser' user but with a custom ssh key name i.e. myuser_github and not id_rsa you will get an error if trying to run the following command:
myuser@host:~/my-user$ git clone email@example.com:someuser/repo.git . Cloning into '.'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Fix this by editing .ssh/config to this:
Host github.com HostName github.com User git IdentityFile ~/.ssh/myuser_github
wiki/git_pull_via_ssh_public_key.txt · Last modified: 2022/03/14 14:35 by antisa