Strange thing :
I'm on a new Windows installation, working with openSSH, git for windows, vscode, sourcetree and tortoisegit.
I set all git-related tools to use openSSH manager, created a new key pair and uploaded the public key to my bitbucket account.
When I create a new repository and clone it to my computer, no problem. However, when pushing to the respository I get this error :
Unauthorized
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.
I checked the SSH key in my account and it isn't there anymore ! When I try to add it again, I get
Someone has already added that key as an access key to a repository.,
so not possible to add the key. Yet, I can still clone and fetch using SSH, so it seems the key is accepted.
I know the easiest things is probably to just create a new key pair, but this is too strange to me not to mention it. Seems like a security issue. Right now, there's no key defined in my account but it is still possible to clone the repository over SSH ?
I tried the same thing with a purpose-created gitlab account and the same SSH key, and there everything works fine.
For reference, "ssh -T hg@bitbucket.org" returns
authenticated via a deploy key.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
This deploy key has read access to the following repositories:
svdvk/dockertest
bruyland/csv-transformer
Hi Stefaan, welcome to the Community.
I've checked your Bitbucket Cloud account for this Atlassian account (the account you're using to access this forum is associated to the username s*********e) and I can see that there's an SSH key there, can you confirm is that the pair to the SSH key you have in your machine?
I've also checked the Bitbucket accounts that were listed in your message, and your current Bitbucket account is not one of them:
- svdvk/dockertest is another Bitbucket Cloud account that seems to be yours too
- bruyland/csv-transformer is a Team account
So seems like you might have several Bitbucket accounts, and you're mixing the credentials. To solve this situation:
- Can you make sure you're using the right account, and that you have the right credentials?
- Can you check that you have the right permissions? (you need write permissions for pushing code)
Let us know!
Ana
Hi Ana,
Things work fine now. The problem was that git was using a different SSH setup than Windows due to installation of toirtoiseGit and some wrong setup. Took me some time to figure out, but it's solved now.
Thanks for looking into this. We're just starting with Jira, bitbucket and confluence and it can be overwhelming at times.
Stefaan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefaan Vandevelde , no worries, I'm glad we could guide you in the right direction :)
If you need anything else, let us know!
Best regards,
Ana
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.