Report this

What is the reason for this report?

Cloned Git Repository Security Issue on Droplet

Posted on August 5, 2021
Joshua Ahn

By Joshua Ahn

Backend Developer

Hi! This might seem like a relatively simple question but something that would go a long way-

I’ve created a Droplet and git-cloned my team’s repository onto it. The droplet is only accessible via a 35-character long root key or an SSH key so I believe it’s very secure.

However, every time someone makes an edit to the repository and I try to git pull on the Droplet to update it, it asks me for the team’s username/password on the Github. I would prefer if there’s a way to not do this as the team and I do not want to compromise the security of our Github in any way. Is there a way for me to git pull on the Droplet without it asking me to provide the username/password each time?

Thanks



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!

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.

Hi @j93hahn,

Yes, there is. You can create an SSH key of your droplet and add it as a key to your GitHub project.

Please check the following article from GitHub - Github SSH keys

It will basically let you know how to create an SSH key and where to add it. What you need to create the SSH key on is your Droplet (basically from where you are pulling the repo).

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.