Can't see any posts that address this specific question so here goes...
I have a git repo on a vps. the repo tracks a website (contained in public_html) and also directories needed by that website (i.e. private, tmp, etc.). Like this: 
    drwxr-xr-x  8 someuser someuser 4096 Jan 17 07:00 .git/
    drwxrwx---  5 someuser www-data 4096 Jan 17 07:00 private/
    drwxr-x--- 10 someuser www-data 4096 Jan 17 07:00 public_html/
    drwxrwx---  2 someuser www-data 4096 Jan 17 07:00 tmp/
as such, this repo is above the web root, not publicly accessible. ssh with key only access is set up on this linux system.
I want to clone this remote git repo via ssh to my local machine. How?
I have tried git clone ssh://user@ipaddress:22/path/to/repo . but I get:
    Cloning into '.'...
    Permission denied (publickey).
    fatal: Could not read from remote repository.
I don't understand why this is because my ssh config file correctly specifies the IdentityFile and Hostname and normal ssh works fine with these settings. 
Any ideas? Thanks.
 
    