Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to access repo via SSH. fatal: Could not read from remote repository.

Matt R May 5, 2019

Hi,

I've been trying to access BB cloud using SSH but I get the following error

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I have verified that my SSH key works and is loaded.

$ ssh -v git@bitbucket.org
...
...
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([18.205.93.1]:22).

I am able to access with HTTPS but not SSH.

$ git ls-remote git@bitbucket.org:matt-roche/genie.git
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
$ git ls-remote https://bitbucket.org/matt-roche/genie.git
1a7f897e338d59af61ac2fc7380ae2b82fbab1cd HEAD
1a7f897e338d59af61ac2fc7380ae2b82fbab1cd refs/heads/master

Additionally, I've tried also removing my SSH key just to check it shows the slightly altered error message.

$ git ls-remote git@bitbucket.org:matt-roche/genie.git
git@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.

As such, I am guessing that this is related to something to do with my configuration in Bitbucket but the config for permissioning is somewhat all over the place.. My "Team" owns all the repos. My team includes my account as an admin. Each repo includes the administrator group as well as explicitly adding my account as an admin (not sure this is needed but it was auto configured).

Would greatly appreciate some help. My setup seems to have spontaneously stopped working in recent times. I had re-added new SSH keys recently and that worked again but once again, it's stopped working overnight. I've been mucking around a bit lately so it could well be that I've accidentally blocked access by mistake but the fact it works for HTTPS but not SSH is conflicting.

Regards,
Matt

1 answer

0 votes
Matt R September 30, 2019

As mentioned here, https://community.atlassian.com/t5/Bitbucket-questions/could-not-read-from-remote-repository/qaq-p/983015#U1190775

The issue is resolved when connected to VPN. There appears to be some kind of block on my IP address

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events