SSH Keys - fatal could not read from remote repository

I have just installed SSH keys for my repo. I followed the gitlab page and created a ED25519 key.

When I run ssh -T I get the welcome sign with the associated username.
If I check git remote -v I see:
origin[username]/[reponame].git (fetch) - username and repo name are filled in and correct.
Repeat same for (push)

When I do a git push or git push origin master I get the error:
fatal: Does not appear to be a git repo
fatal: Could not read from remote repository

It did work through HTTPS the other day. This is the first time I have added SSH keys.

Any help would be great. Thanks


I’ve got the exact same error message with SSH, though HTTPS works fine.
What I don’t understand is that, my other projects works fine with SSH, but every new project I create generate this error.

Is anyone solved this problem?

Please check/try the following suggestions in order and proceed to the next suggestion only if the issue persists.

  • Make sure protected branches is OFF
  • Re-added your ssh-key
  • Try connecting via https: and see if that is working
  • If https: connection works but ssh does not, please try connecting using an alternate SSH connection
  • Check DNS. Check if your firewall is also allowing outgoing traffic on 53/tcp port (which is where DNS is working).
  • If DNS is not a problem, are you using any kind of Firewall which is blocking the connection? What happens when you run curl
  • Do you use LDAP and have any non-standard configuration in the file /etc/security/access.conf?