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
Students: Start building your skills with the GitHub Foundations certification
The GitHub Foundations Certification exam fee is now waived for all students verified through GitHub Education.
Announcing GitHub Secure Open Source Fund: Help secure the open source ecosystem for everyone
Applications for the new GitHub Secure Open Source Fund are now open! Applications will be reviewed on a rolling basis until they close on January 7 at 11:59 pm PT. Programming and funding will begin in early 2025.
Software is a team sport: Building the future of software development together
Microsoft and GitHub are committed to empowering developers around the world to innovate, collaborate, and create solutions that’ll shape the next generation of technology.