How to pull the new version of a site with git automatically without needing to store the git password on the server?

StackOverflow https://stackoverflow.com/questions/23475876

  •  15-07-2023
  •  | 
  •  

Domanda

I have a server and I want to create a script that will pull the new version of the site and do some other stuff. But in order to pull you need the git password, which I don't want to store it on my server. What are the best practices in doing this?

Thanks

È stato utile?

Soluzione

ssh keys seem to be what you are looking for. GitHubs explanation:

We strongly recommend using an SSH connection when interacting with GitHub. SSH keys are a way to identify trusted computers, without involving passwords.

Here is the full article on the topic: https://help.github.com/articles/generating-ssh-keys

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top