Cloned Git Repository Security Issue on Droplet

Posted August 5, 2021 229 views
SecurityDigitalOcean Droplets

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?


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.

Submit an Answer
1 answer

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).