I have created a private repo on github, I want to clone this (empty) repo to my local computer to push changes to.
I'm using MacOS Ventura 13.0.
I have created a keypair and I have uploaded the public key to Settings > SSH and GPG keys
. I have added this key to the ssh-agent. When I test my SSH connection to GitHub, everything works as expected (I get the preferred output like my username and stuff).
When I try to clone the private repo, I get the following output:
user@my-mac <folder> % git clone git@github.com:<username>/<repo>.git
Cloning into '<folder>'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What could possibly be wrong? Should I add the SSH key to a specific repo (in deploy keys)?