I quite often hit the following issue when building new servers and then trying to download repositiories from github.com
graham@leader01:~ $ git clone [email protected]:allthingsclowd/web_page_counter.git
Cloning into 'web_page_counter'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
graham@leader01:~ $
This is usually because the public key github tries to use ~/.ssh/id_rsa.pub
is not yet registered on github.com as an authorised ssh key.
Copy you're existing github public/private keys to ~/.ssh/id_rsa.pub
& ~/.ssh/id_rsa
. (Note: Private key should not traverse the internet)
Register the new public key located at ~/.ssh/id_rsa.pub
to you github account (https://github.com/settings/ssh).
Create a new key if this is your first time and you don't have an SSH key pair already and then jump back to sloution 2 above.
ssh-keygen -t rsa