Hi all, I’m brand new to web development and DO. I’m following a tutorial on Full Stack Web Development. I managed to create a droplet, create a new sudo user for myself that I can SSH into my DO server with. One thing I noticed after creating the new user and adding it to groups sudo and admin, I now see a $ instead of the # after my userid whereas when using root it was the #. Not sure if that is causing my problems. I created a ssh key from within my droplet and printed it to the screen. Copied that manually into a new SSH key in my Github account. I cloned a repo using ssh and then typed sudo git clone git@github.com:lizyorick/markdown-portfolio.git Here’s a screenshot of what I’m seeing.
liz@ubuntu-server:/var/www$ sudo git clone git@github.com:lizyorick/markdown-portfolio.git [sudo] password for liz: Cloning into ‘markdown-portfolio’… git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. liz@ubuntu-server:/var/www$ git clone git@github.com:lizyorick/markdown-portfolio.git fatal: could not create work tree dir ‘markdown-portfolio’: Permission denied liz@ubuntu-server:/var/www$ ls -la total 12 drwxr-xr-x 3 root root 4096 Mar 31 17:04 . drwxr-xr-x 14 root root 4096 Mar 31 16:00 … drwxr-xr-x 2 root root 4096 Mar 31 16:00 html
Shouldn’t my username be in place of root when I ls? How do I fix this? Please help!!
Liz
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If I follow your post;
cd /var
sudo chown -Rf liz:www-data www
cd /var/www
Then clone your repo.
Also - try cloning over https now ssh
git clone https://github.com/lizyorick/markdown-portfolio.git
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.