Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Thats why i suspected, but now I have added the ssh key from the cpanel account (I have a WHM and 3 accounts)
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
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.
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.
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)
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:
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.
Look for my response to the person who helped me above. that is the answer that solved it for me.
Basically , follow the Bitbucket documentation to add your ssh key to the repository settings, and THEN ALSO, add the same SSH key to the PROFILE settings which ALSO has a second SHH key area. That finally made the access denied stuff go away. :-) See full answer above for January 18, 2018, and my response.
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 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:
Then it works again for a while.
If it stops, I repeat those steps...
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.
Hello folks, This is a series of articles where I explain GitHub Script with GitHub Actions and how you can automate publishing data on Atlassian & GitHub Platform based on the results of Workf...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events