Can't clone repo despite successful authentication

Viewed 911

I'm on a mac and trying to clone a repo I created on another machine with a private github account.

I went through the typical ssh key steps but for whatever reason I still cannot clone using ssh.

when I run:

ssh -T git@github.com-<private account> 

I get

Hi <private account>! You've successfully authenticated, but GitHub does not provide shell access.

My ~/.ssh/config

Host github.com
 HostName github.com
 User git
 IdentityFile ~/.ssh/id_rsa
 IdentitiesOnly yes

Host github.com-<private account>
 HostName github.com
 User git
 IdentityFile ~/.ssh/id_rsa_****
 IdentitiesOnly yes

When I clone:

Cloning into 'my repo'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

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

I don't get anything out of the ordinary from:

ssh -v git@github.com-<private account>

The repo was created with git 1.9.1, while I'm trying to clone with 2.11.0. Could that make a difference?

1 Answers

The difference of Git version should not matter.

But if you want to clone with the right ssh authentication, you need to use the right ssh URL:

git clone github.com-<private account>:<auser>/<aproject.git>
Related