TIL: Where does Github CLI store its credentials?

 ·  subscribe to my posts

When using sapling, it can access my github with my credentials by asking me to gh auto login. I was wondering where it stores these credentials: in the keychain, in a file, in the environment? It’s here:

$ cat ~/.config/gh/hosts.yml
github.com:
    user: iOliverNguyen
    oauth_token: gho_████████████████████████████
    git_protocol: https

Let's stay connected!

If you like the post, subscribe to my newsletter to get latest updates:

Author

I'm Oliver Nguyen. A software maker working mostly in Go and JavaScript. I enjoy learning and seeing a better version of myself each day. Occasionally spin off new open source projects. Share knowledge and thoughts during my journey. Connect with me on , , , , or subscribe to my posts.