By Casey Lisak
I am trying to setup a git repo on my local than can push to my ubuntu server. I have been following this tutorial . I have also FTPed in to the server to make sure all my files are being edited/created. Under ‘Setup a Git User and Install Git on your VPS’ step I followed the commands to create a user git. I checked to see if it exists with the command ‘compgen -u’ . Yep I see git there. When I put in the next step I get the following errors:
git@K-home:/$ mkdir ~/.ssh && touch ~/.ssh/authorized_keys
mkdir: cannot create directory ‘/home/git/.ssh’: No such file or directory
I checked the /home directory and I see another user I created. However, I do not see the git user that I apparently created.
I also tried to copy and paste that user and update the name to git, didnt work since when I try to push from my local to that remote I get this error
mMP$ git push upstream master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
can you guys help? I am not sure what I am doing wrong here
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!
Do not use “useradd” command instead use “adduser” in order to add git user.
Hi kazlisak! Did you find the solution? I have a very similar topic…
BR, Peti
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.