0

I have a repo in bitbucket on vinay-joseph. I also have repos in bitbucket on vinayjoseph.

Here is the contents of my ~/.ssh/config file

Host workid
 HostName bitbucket.org
 User vinay-joseph
 IdentityFile ~/.ssh/xxxx
Host personalid
 HostName bitbucket.org
 PreferredAuthentications publickey
 User vinayjoseph
 IdentityFile ~/.ssh/yyyy

from my repo when i run ssh -T hg@bitbucket.org, I get the following

logged in as vinay-joseph.

You can use git or hg to connect to Bitbucket. Shell access is disabled.

SSH keys have been stored in bitbucket for the relevant repos.

However, when i try to push i get the following error.

 git push origin master

    conq: repository access denied.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

ssh-add -l gives

ssh-add -l
2048 cc:15:1d:e4:ac:c6:28:eb:2a:6f:41:0e:53:62:53:c7 /Users/rr/.ssh/xxxx (RSA)
2048 4f:51:5a:49:cb:da:41:2f:08:a2:2f:05:dc:2a:63:dc /Users/rr/.ssh/yyyy (RSA)

I want to use my personalid to check in the code. Please help.

Vinay Joseph
  • 5,515
  • 10
  • 54
  • 94
  • Atlassian provides [documentation for multiple identities](https://confluence.atlassian.com/bitbucket/configure-multiple-ssh-identities-for-gitbash-mac-osx-linux-271943168.html) and [general documentation for SSH for Git](https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html). Have you worked through that? – Harmelodic Mar 17 '16 at 13:38
  • Possible duplicate of [push using multiple account / multiple identity on github / bitbucket](http://stackoverflow.com/questions/18725033/push-using-multiple-account-multiple-identity-on-github-bitbucket) – Jakuje Mar 17 '16 at 14:26

0 Answers0