Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
cannot ssh into git from liz@ubuntu-server Permission denied (publickey) fatal: Could not read from remote repository.
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 firstname.lastname@example.org:lizyorick/markdown-portfolio.git Here’s a screenshot of what I’m seeing.
liz@ubuntu-server:/var/www$ sudo git clone email@example.com:lizyorick/markdown-portfolio.git
[sudo] password for liz:
Cloning into ‘markdown-portfolio’…
firstname.lastname@example.org: 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 email@example.com:lizyorick/markdown-portfolio.git
fatal: could not create work tree dir 'markdown-portfolio’: Permission denied
liz@ubuntu-server:/var/www$ ls -la
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!!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×