Getting
Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Your server's private ssh key is most probably different to your local private key
You need to also tell Bitbucket about your keys on your server.
Thats why i suspected, but now I have added the ssh key from the cpanel account (I have a WHM and 3 accounts)
http://screencast.com/t/YX6f1X9gZ
I added the rsa one, does that make a difference? http://screencast.com/t/QtYeaxN9i9q
But I am getting the same error http://screencast.com/t/iZ17U2mn44mh
Here is what I am trying to do
http://screencast.com/t/gWGewHZA6
I have the same problem. Even when I create key with kommandssh-keygen -t rsa -b 4096 -C "email@domain.com" and inspect that code, add them on my repository "Add key" still doesn't work.
Me too having the same problem.
I'm facing the same problem. I have followed the steps in the guide by Bitbucket which tells how to set up a new SSH key and add it globally to Bitbucket. I did it via the Sourcetree GUI, but I still keep getting the message that Sourcetree could not read from the remote repository. I don't understand how to fix this.
Make sure you have added your key to your bitbucket profile settings and not your repository settings. The guide on how to generate a new ssh key does not explicitly make a distinction between the two. If you have added your key to the settings within your repository, then you won't have the correct access rights.
is was what I needed to see. Bitbuckets interface is not very intuitive. the 2 different settings with ssh keys threw me for a look. No idea there was a profile setting also. Come on Bitbucket! :-)
Did u figure out how to solve this issue, using the sourcetree UI?
I join the people, who have this problem. Strangely enough, sometimes it works, then, after a while, it stops working and throws the error message Archit Chandra shows.I also realized that, in `known_hosts`, the number of entries grows every time, when I update a repo via the Sourcecode app.
So I deleted all those entries. Being on a Mac, I also followed this advise:https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#adding-your-ssh-key-to-the-ssh-agentThen it works again for a while.If it stops, I repeat those steps...
For me, this seems beyond complex.Pulling down code from a code repository like Bitbucket to your local mac should be easy, but it isn't.
We've added 2-factor authentication to our Bitbucket account as now suggested by Bitbucket themselves, but copying the SSH and the HTTPS variants provided by Bitbucket themselves to clone the repository do not work.
Additionally, the various online guides on Bitbucket as to how to "solve" the various issues raised by their own commands are typically extremely terse and assume expert knowledge from the end user already.
Is there a simple, step-by-step guide for a novice as to how on earth do a simple clone from a Bitbucket repository to your local mac, whilst at the same time fighting through the forest of impenetrable error messages it throws at you, such as, "Please make sure you have the correct access rights", or (my favourite), "To make a call, you need to use an app password."
Frustrated - just want to get on with coding but can't. Any help gratefully received.
Is your key created by SourceTree?
If so, then change the name in the config file, because it seems that one is wrong:
1. Go to your .ssh folder in your User folder (on mac os 10.13 hit "CMD" + "." to make invisible files visible)
2. open the config file
3. look for sth like this:
# --- Sourcetree Generated ---Host bitbucket.org---(exchange whatever is her with what is written at HostName - must be equal, and most likely bitbucket.org)HostName bitbucket.orgUser ----PreferredAuthentications publickeyIdentityFile /Users/rowild/.ssh/----UseKeychain yesAddKeysToAgent yes# ----------------------------
4. Whatever is written at Hostname hass to be written to Host, too (most likely bitbucket.org, if you have a free account)
This should work for one account. I've read that as soon as there are more accounts that want to access one repository, this is going to fail again. But the solution for that is actually posted somewhere on Apple, because it seems to be a problem with Apple's KeyChain (but I didn't dig too deep into that)Otherwise I agree with you!Bitbucket, make it easier. The simple fact that there are so many posts out there that concern this problem, should be indicator enough to let you know, there is something severely wrong with your service...
Here are some hopefully helpful read-ups:
https://apple.stackexchange.com/questions/48502/how-can-i-permanently-add-my-ssh-private-key-to-keychain-so-it-is-automatically
https://developer.apple.com/library/archive/technotes/tn2449/_index.html
Any always delete old, none.working key from your known_hosts and authorized_keys files, the mac keychain and as well as from your bitbucket repo.HTH
Make sure you have access rights to the directory you are cloning into.
My problem was the directory I was trying to clone into it did not have write access to on my local machine. Once I moved into a directory I had write access (in honestly I set the access rights to all all) then it worked for me.
For clarity, in my circumstance I was trying to clone a git repository, after I had made sure that ssh-agent was running, my private key had been added to ssh-agent and successfully ran the tests as specified on this page: https://confluence.atlassian.com/bitbucket/troubleshoot-ssh-issues-271943403.html . This document was really helpful in the process too: https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html .
I saw the same thing when using the HTTP version of my repository. Switching to the SSH version solved this.
This solved my problem too.
What is the use of the project ssh keys?
(Had my key added there, didn't allow me to push with it.)
This solved my problem too! 👍🏻
It looks like you're new here. Sign in or register to get started.