Hi, I've followed the guidelines for setting up multiple SSH keys in bitbucket but it doesn't work.
Here is my setup
~/.ssh/config
Host github.com
IdentityFile ~/.ssh/github
IdentitiesOnly yes
Host bitbucket.org-{username_1}
HostName bitbucket.org
User git
IdentityFile ~/.ssh/bitbucket-nari
Host bitbucket.org-{username_2}
HostName bitbucket.org
User git
IdentityFile ~/.ssh/bitbucket-delori
I can't connect to either bitbucket.org-{username_1} or bitbucket.org-{username_2}.
ika@Iraklis-MacBook-Pro ~ % ssh -Tv bitbucket.org-{username_2}
OpenSSH_9.8p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/ika/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to bitbucket.org-{username_2} port 22.
ssh: Could not resolve hostname bitbucket.org-{username_2}: nodename nor servname provided, or not known.
Here is local git config in one of my repositories
[user]
name = {username_2}
email = {email}
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = git@bitbucket.org-{username_2}:trsthb/dpp-portal.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
vscode-merge-base = origin/master
[branch "develop"]
remote = origin
merge = refs/heads/develop
vscode-merge-base = origin/develop
Everytime I run git pull it throws following error
ssh: Could not resolve hostname bitbucket.org-irakli____ghachava: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
What am I doing wrong here?
P.S. Yes, I've added public keys to corresponding bitbucket accounts in personal bitbucket settings.