Here's a little something that allows github to use GITHUB_USER and GITHUB_TOKEN environment variables as alternatives to the git config keys github.user and github.token. I wrote this up when I realized I might in some cases want to version control my ~/.gitconfig. Hope you find it useful.
Specs for getting github credentials from environment
Expects GitHub::Command to use a getenv helper to query the environment.
Get github credentials from environment if not in config
Queries the environment for GITHUB_USER and GITHUB_TOKEN using a getenv helper.
The values from git config are preferred, but if they don't exist, the
environment versions are used.
Fix other github_user related specs to expect getenv calls