I have Ubuntu server with two users
root #root account of the system
myuser #user added to sudo group
Under root user I generated ssh keys which was added into. ssh directory
/root/.ssh
|__ id_rsa
|__ id_rsa.pub
After it i run ssh-agent under the same root user
eval "$(ssh-agent -s)"
Than added my private key to it
ssh-add .ssh/id_rsa
It was properly added than i added my public key to github repo.
After it i switched to my sudo user copied id_rsa
and id_rsa.pub
to my sudo user home directory
/home/myuser/.ssh/
and tried to access repo which was configured under root account and system prompt me that i hasn't access to it. I didnt understand why so. Can anyone guide me to properly setup access to github repo by the same private keys by two system users