Bitbucket - Permission Denied (Public Key)
I Have Repos in Github and Bitbucket. First I Wanted to Use Same Public Key in Bb and Gh with No Luck. So I Created Another Public Key, My. Ssh/Config File...
I have repos in github and bitbucket.
First I wanted to use same public key in bb and gh with no luck.
So I created another public key, my .ssh/config file look like this:
Host bb
HostName bitbucket.org
User hg
PreferredAuthentications publickey
IdentityFile C:/Documents and Settings/Marek/.ssh/bb
Host github
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile C:/Documents and Settings/Marek/.ssh/id_rsa
bb.pub is for bitbucket. I pasted key from this file to bitbucket.
I still having
Permission denied (public key)
when I try to push my initial commit. Could somebody help?
HELP
1 Answer
You should always use "git" and "hg" as the usernames for github and bitbucket, and not your own username. The public key itself will be used to identify you.