Problem statement : Clone 2 repos from Github
Actions Taken :
Created 2 ssh keys and added to corresponding repos's deploy keys.
Create a config file in Home/Ubuntu/.ssh folder
Host aimer-ui github.comHostName github.comIdentityFile /home/ubuntu/.ssh/id_rsa_new.pub
Host aimer-service github.comHostName github.comIdentityFile /home/ubuntu/.ssh/id_rsa.pub
Error Coming on Cloning :
Cloning into 'aimer-ui'...Load key "/home/ubuntu/.ssh/id_rsa_new.pub": error in libcryptoLoad key "/home/ubuntu/.ssh/id_rsa.pub": Permission deniedgit@github.com: Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.ubuntu@ip-172-31-44-226:~$ git clone git@github.com:BeA-Brand/aimer-service.gitCloning into 'aimer-service'...Load key "/home/ubuntu/.ssh/id_rsa_new.pub": error in libcryptoLoad key "/home/ubuntu/.ssh/id_rsa.pub": Permission deniedgit@github.com: Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
My Observation : Same ssh being used in cloning the repos. But in that case, atleast one repo would have worked.