I have been working on a project for a few weeks now using ssh key. However today I tried to push some changes and received this error:
kex_exchange_identification: read: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I then tried again and received a similar but slightly different error:
kex_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
When I saw this I went a checked both the access keys for the repo and my account SSH keys. The repo access keys was empty and said 'there are no keys configured' . My account ssh keys only had a default public key
.
I then tried to add my ssh key back to both the repo and my account, however, when I did I would be told 'Someone has already added that SSH key to another account'. When Looking online to resolve this I came across this command
ssh -T git@bitbucket.org
This would give me an error again
kex_exchange_identification: read: Operation timed out
I only have one account and have only used the one SSH key.
Hi Daniel and welcome to the community!
Access keys that are added to a repo provide read-only access to repositories. If you add an SSH key to a repo, you will only be able to clone and pull this repo and not push.
If you want to be able to push via SSH to repos you have access to, the public SSH key needs to be added to your account (like in the second screenshot you attached). In that screenshot, there is a key listed. If you select the pencil icon in that entry, you'll be able to view the public SSH key and check if it's the same as the public key on your machine. If they are the same, then this shouldn't be an issue.
If you have any questions, please feel free to let me know.
Kind regards,
Theodora
Hey, thank you for the answer.
I believe I was having the problem as I was on a different network. Now I'm back on the network I usually use and everything works as normal.
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.