'ssh -T git@gitlab.com' works fine, but git push/pull over ssh does not

I’m using a repo hosted on gitlab.com. I’ve set up SSH keys, etc.

  • The repo I’m (trying) to work with definitely exists. I can clone/push to/pull from it via HTTPS without issue.

  • The SSH key pair I’ve configured does work… I can run ssh -T git@gitlab.com and get a “Welcome to GitLab, @username!” response.

  • Attempting to access the repo via SSH fails with some kind of auth issue:

    > git pull
    git@gitlab.com: Permission denied (publickey).
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.
  • The remote URL looks like git@gitlab.com:username/reponame.git

  • An older repo on the same server has ceased to work over SSH too.

Clearly both the SSH key is set up to let me access the server, and the repo exists, so what else might have gone wrong?