I asked for help on stackoverflow and I was told it is more than likely a Ubuntu problem and was recommended to ask here.
I'm trying to clone a private git repo to my web folder on Ubuntu. I've created the SSH key pair & added it to my account settings on githubs end.
ssh-add ~/.ssh/id_ed25519
> Identity added: /home/ubuntu/.ssh/id_ed25519 (email)
ssh -vT [email protected]
> Hi CNRP! You've successfully authenticated, but GitHub does not
> provide shell access. debug1: channel 0: free: client-session,
> nchannels 1 Transferred: sent 2148, received 2336 bytes, in 0.2
> seconds Bytes per second: sent 10468.5, received 11384.7
I've tried the following and all respond with similar errors.
git clone [email protected]:CNRP/project-name.git
> fatal: could not create work tree dir 'project-name': Permission
> denied
sudo git clone [email protected]:CNRP/project-name.git
> [email protected]: Permission denied (publickey). fatal: Could not read
> from remote repository.
>
> Please make sure you have the correct access rights and the repository
> exists.
git clone https://[email protected]/CNRP/project-name.git
> fatal: could not create work tree dir 'project-name': Permission
> denied
The folder I'm trying to clone to is the /var/www/ web folder. I'm thinking its possibly something todo with user permissions? I've troubleshooted all the github authentication steps and repeated it multiple times so I'm thinking the SSH authentication isn't the problem.
Any help on what I can do from here to work this out is highly appreciated, Its left me stumped!