A remote connection from a local git repository to GitHub repository, with registered email email-1@email.com, is in place. Connection is working with no issues.
A second remote connection is being made to a different GitHub repository under a different GitHub account registered with a different email address (email-2). Firstly an SSH key is made of type ed25519 using:
$ ssh-keygen -t ed25519 -C "email-2@email.com"
A single existing ssh keys exists in the default repository (that for email-1@email.com). As such a name is given to the new key; "passion". Viewing the .ssh folders show the public and private keys of the new ssh key:
This key is then added to the GitHub account: Settings -> SSH & GPG Keys -> New SSH Key; the contents of passion.pub are then copied into "key" which is of type "Authentication Key".
This key is then added to the agent:
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/passion
Both keys are shown to be present in the agent:
This is the first time creating a secondary remote with secondary key. As such it is necessary to create the file ~/.ssh/config with IdentitiesOnly set to yes. Then add an alias to point the agent to the secondary key to use for the secondary remote.
cd ..ssh
touch config
The alias for the secondary remote is then entered.
IdentitiesOnly yes
Host passion-origin
HostName git@github.com:account/passion
User email_2@email.com
IdentityFile ~/.ssh/passion
A new local folder is created with the same name as that of the GitHub repository. Then a local git repository is created therein using:
git init
A new remote is added to the GitHub repository for the account registered with email-2@email.com using the ssh address:
git remote add passion-origin git@github.com:account/passion
This is found to be successfully in place:
git remote -v
It is then attempted to pull from the new remote but this returns an error:
What is the error in my approach?