Is there a way to save credentials for the www-data user on ubuntu? I need it to push to a private Github repo in a php script, but at the moment it's not working due to needing credentials each run.
Thanks in advance :)
Is there a way to save credentials for the www-data user on ubuntu? I need it to push to a private Github repo in a php script, but at the moment it's not working due to needing credentials each run.
Thanks in advance :)
If you use SSH to access the GitHub remote instead of HTTPS you can authenticate with SSH keys. Generate a password-less SSH key as www-data, then add the generated public key in GitHub settings.
See: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#platform-linux and https://help.github.com/articles/reviewing-your-ssh-keys/