Steps I've taken:
Follow this guide exactly https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/
This is my test connection message:
ssh -T git@bitbucket.org
authenticated via ssh key.
You can use git to connect to Bitbucket. Shell access is disabled
This is message I get when I try to push my files into my repo
root@jirau-virtual-machine:/var/atlassian/application-data/jira/scripts# git push bitbucket2
root@bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
This repo does exist in my Bitbucket Cloud and was created by me
My remote settings:
root@jirau-virtual-machine:/var/atlassian/application-data/jira/scripts# git remote -v
bitbucket2 ssh://bitbucket.org/inforcekz_jira/scripts/src/master/ (fetch)
bitbucket2 ssh://bitbucket.org/inforcekz_jira/scripts/src/master/ (push)
SSH settings under Personal settings in Bitbucket:
SSH port is open on my VM as I can only connect to it via SSH
I've got the same issue, but I found better solution, I just changed remote from git@bitbucket.org into user@bitbucket.org
Hey Gleb,
Welcome to the Bitbucket Cloud Community!
A common issue I see is that the SSH will authenticate, but it will not use the correct key and therefore will fail to grant access.
Please try to update your remote URL as follows to specify the username to authenticate with in GIT, provided your ~/.ssh/config file has been mapped correctly this should authenticate without issues:
git remote set-url origin username@bitbucket.org:workspaceID/reposlug.git
#username accountHost bitbucket.org-usernameHostName bitbucket.orgUser gitIdentityFile ~/.ssh/privatekeynameIdentitiesOnly yes
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.