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