I'm following the instructions on this video of how add second github account. But I'm getting this error:
ssh: Could not resolve hostname github-secondAccount: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Here is what I have done.
I add it a second sshkey:
id_rsa
id_rsa.pub
id_rsa_secondAccount
id_rsa_secondAccount.pub
And also created a config:
#first account
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
#secondAccount account
Host github-secondAccount
HostName github.com
User git
IdentityFile id_rsa_secondAccount
echo "# myNewRepo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github-secondAccount:myUSer/myNewRepo.git
git push -u origin master
But at the moment of git push -u origin master
I'm getting this error:
ssh: Could not resolve hostname github-secondAccount: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Any of you knows what I doing wrong or how can fix this?
I'll really appreciate your help.