Skip to content

Instantly share code, notes, and snippets.

@timstott
Last active February 2, 2024 11:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timstott/6ca70f61a48488a1dbf9c7964cf55211 to your computer and use it in GitHub Desktop.
Save timstott/6ca70f61a48488a1dbf9c7964cf55211 to your computer and use it in GitHub Desktop.
Use password-store (aka pass) with forge and github-review

Use password-store (aka pass) with forge and github-review

We can use pass as an emacs auth-source backend to access credentials.

Add auth-source-pass (included with emacs 26) to your emacs config:

(require 'auth-source-pass)
(auth-source-pass-enable)

This prepends password-store to the variable auth-sources.

Add the GitHub access token to pass with auth info.

pass insert -m api.github.com
<API_TOKEN>
<GH_USERNAME>^github-review
<GH_USERNAME>^forge

This allows forge and github-review to access the same token under a single pass entry.

Done 🎉

To view what other pass entries forge/github-review access, enable debug and check the Messages buffer with an operation that requires authentication such as forge-add-repository:

(setq auth-source-debug t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment