Local GitHub Config
With awesome tools like GitNub and GitX adding GitHub integration, it would be great if you didn’t have to keep re-entering you username and API token. So let’s settle on…
With awesome tools like GitNub and GitX adding GitHub integration, it would be great if you didn’t have to keep re-entering you username and API token.
So let’s settle on a standard, pioneered by GitNub:
$ git config --global github.user defunkt $ git config --global github.token 6ef8395fecf207165f1a82178ae1b984
(Remember to replace @defunkt@ and @6ef8395fecf207165f1a82178ae1b984@ with your own username and token.)
Applications and scripts can easily access this information:
$ git config --global github.user defunkt
You can also access ~/.gitconfig directly.
I just pushed out new versions of my gist script and the gist.el mode which use this method. Check the code for examples in Ruby and Emacs Lisp.
If you’re a developer, please adopt this method of storing GitHub data. Your users will thank you!
Written by
Related posts
Celebrating the GitHub Awards 2024 recipients 🎉
The GitHub Awards celebrates the outstanding contributions and achievements in the developer community by honoring individuals, projects, and organizations for creating an outsized positive impact on the community.
New from Universe 2024: Get the latest previews and releases
Find out how we’re evolving GitHub and GitHub Copilot—and get access to the latest previews and GA releases.
Bringing developer choice to Copilot with Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview
At GitHub Universe, we announced Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview and o1-mini are coming to GitHub Copilot—bringing a new level of choice to every developer.