I have transfered my ssh key from my root to my user account by ssh-copy-id
command
so now I have these files in my .ssh folder
user@user-php:~/.ssh$ ls
authorized_keys config id_rsa id_rsa.pub known_hosts
Now when I want to clone a project and actually the public key is in authorized_keys file it gives me error
user@user-php:/var/www/ts$ git clone [email protected]:/xxxx.git
Cloning into 'xxxx'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
it is not pick up public key form authorized_keys
now why it not picking up the public key and is there any way i can tell git which public key to use.
EDIT:
i have also try one more thing i have copyied all the keys from root/.ssh folder to user/.ssh but it still gives Permission denied (publickey).
error