I have setup my personal account as a member of a workspace. I can browse the repos in the workspace within the browser. I also added an SSH key to my personal account. Running "ssh -v git@bitbucket.org" works and says something like "You can use git to connect to Bitbucket." But when I try to clone the repo I get the error "git@bitbucket.org: Permission denied (publickey)".
Accessing the same repo from another account (obviously with a different SSH key) works without any problem.
Do you have any ideas?
Welcome to the community.
To make sure your SSH key is in use, would it be possible for you to add it to your SSH agent?
eval $(ssh-agent) ssh-add <Private SSH key location>
Once done, try to clone again.
If the issue still persists, you can try to enforce your environment to use a specific SSH key identity by adding the configuration below in your SSH config file.
Host bitbucket.org HostName bitbucket.org IdentityFile <Private SSH key location>
If you don't have the SSH config file yet, you can create it first:
vim ~/.ssh/config chmod 600 ~/.ssh/config
Hope it helps and let me know how it goes.
Regards,
Mark C
Hi Mark,
Sorry for late answer, the move to bitbucket cloud has been postponed for some time. But now I'm ready to tackle it again.
Meanwhile I also found the problem. I had my .ssh folder in my Windows home folder, but git bash was using a different folder as home. After moving the keys there everything worked fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries at all @Martin Fuhrer
Glad to know that after moving your keys, everything worked fine.
Do let me know if you have further questions that I can help with.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.