Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

could not read from remote repository

Francesca Giammichele March 19, 2022

Hallo,

I have a problem with pulling my repo on the server computer. In my BitBucket account, I have enabled the 2fa and had created an ssh key according to the documentation

https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

Everything worked a few days ago and I could successfully pull my repo from bitBucket. 

After fixing a bug, today I was trying to pull the fixed repo but I got this message

```

To access this repository, enable two-step authentication.
fatal: Could not read from remote repository.

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

```

I have already googled for a solution and tried adding a new key but I still could not have the pull working. I am the only person working on that repo and can not understand what might have changed in a few days. I have only noticed that the ssh in my bitBucket repo was used dew days ago and not used today, after my pulling attempts

the URL for git repository is already updated to ssh

if I run ssh -T git@bitbucket.org I get this message:

```

authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled

```

I have also tried with a different network, VPN and checked that bitBucket services are on and working. Any help, please?

2 answers

1 accepted

0 votes
Answer accepted
Francesca Giammichele March 21, 2022

created and modified the .ssg/config file with this lines:

````

Host *

IdentityFile ~/.ssh/id_rsa

````

it works now :)

Scott Chapman July 12, 2022

Thanks for this, this fixed my issue as well! To be more specific: I created a specific key for bitbucket and had to update ~/.ssh/config to include a reference to that key for the bitbucket server:

Host bitbucket.org
HostName bitbucket.org
IdentityFile ~/.ssh/bitbucket_devrig

 

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2022

Hi @Francesca Giammichele 

Welcome to the community!

Just to confirm are you still having an issue with this?

This error looks like you are trying to access a Workspace that has their Premium access feature enabled that enforce users to enable their two-steps verification account before they can access the Workspace and repositories.

I can see that your Bitbucket account has all the requirements setup correctly so you should have no issue to access, please confirm if you are still affected by this.

Cheers,
Syahrul

Francesca Giammichele March 21, 2022

Hi @Syahrul , yes I still have the issue :(

But what I cannot really understand is why it worked correctly a few days ago :(

The only thing that comes to my mind is that I created the ssh key with a password. However the first time I used the git pull I was asked for none.

Do I need to use that password somewhere when pulling the repo? What is the difference in creating a ssh key with or without a password, then?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events