Here we explore the idea of linking your server to your GitHub account using SSH Keys access. This option should be examined from a security point of view. For now it's just a useful and interesting hack - don't use on a server you care about :)
First:
- Install git
- Set up Your SSH Keys
- Configure new git user
- Add key to GitHub - github ![]()
If you are unable to configure the default git user (for instance because the www-data user cannot access the relevant profile / ENV variables / does not have bash configured - then you can use the following:
# See also - Set up Your SSH Keys
git -c "user.name=Your Name" -c "user.email=Your email" commit ...