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 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.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like