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
Inside the research: How GitHub Copilot impacts the nature of work for open source maintainers
An interview with economic researchers analyzing the causal effect of GitHub Copilot on how open source maintainers work.
OpenAI’s latest o1 model now available in GitHub Copilot and GitHub Models
The December 17 release of OpenAI’s o1 model is now available in GitHub Copilot and GitHub Models, bringing advanced coding capabilities to your workflows.
Announcing 150M developers and a new free tier for GitHub Copilot in VS Code
Come and join 150M developers on GitHub that can now code with Copilot for free in VS Code.