Im getting a Fatal Error when trying to clone a repo to a new directory. I can't see what I'm doing wrong.
Im on a CentOS server, at the command line running:
git clone git@github.com:MYUSERNAME/REPONAME.git newdirectory
I get the error:
fatal: Could not switch to 'git@github.com/MYUSERNAME': No such file or directory
newdirectory definitely exists, and the user I am logged in as has write permissions, and also has a github ssh key set up.
If i put something in the newdirectory
Anyone got any ideas I can try? Cheers
UPDATE: This is what happens if I try SSL based instead of SSH:
-bash-4.1$ git clone https://github.com/MYUSERNAME/REPONAME.git newdirectory Initialized empty Git repository in /var/www/html/newdirectory/.git/ error: The requested URL returned error: 401 while accessing >https://github.com/MYUSERNAME/REPONAME.git/info/refs
fatal: HTTP request failed
I think this is to be expected though, its a private github repo, Im not sure https works for private repos? Part of why I have always used ssh (successfully) in the past.