Creating a new Project from GitHub repository; need to be able to put in security keys

So here is the error, but I am not surprised.

>>> git clone --progress git@github.com:****************************** project
Cloning into 'project'...
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

**Please make sure you have the correct access rights**
**and the repository exists.**

Question:

so where do I stick my GitHub keys?

Peter

You add your ssh keys to your ssh-agent

This isn't really an R nor Rstudio question. The answer you're looking for is probably covered by this page about adding the keys to your agent which is part of a more comprehensive tutorial about using ssh to connect to github.

Where to store github keys? Wherever you store ssh keys.

On many systems keys are stored in ~/.ssh directory. Generally any location works so long as it's only readable by the user the keys belong to.

Configure ssh-agent to automatically add keys it finds.

In short, you put the keys somewhere ssh-agent picks them up automatically, or you add them manually.

Roll your own key adding

I use a bashrc to add they keys for a certain amount of time when I start a login terminal. My .bashrc contains the following:

if [[ `ssh-add -l` == *"mygitkey"* ]]; then 
echo 'github identity aldready added.'
else
  ssh-add -t 8h ~/.ssh/mygitkey
fi