Magit Forge

Magit Forge

November 9, 2024 | permanent

tags
git

Magit Forge #

Forge allows you to work with git forges, currently Github and Gitlab, from the comfort of Magit and Emacs. manual

Forge Installation and configuration #

installation and config

Installation #

ref

(use-package forge :after magit)

;; or
;; init of Doom Emacs
(magit             ; a git porcelain for Emacs
        +forge)           ; interfaces for git forges

Github token #

Visit https://github.com/settings/tokens in a browser to generate a new “classic” token using the repo, user and read:org scopes. Do not close the browser window just yet, because the token will only be shown once.

With permissions

repo
user
read:org

authinfo #

# C-x c-f ~/.authinfo.gpg RET
machine api.github.com login ziggy^forge password 012345abcdef...

The value of

machine
must be api.github.com. Variations of this won’t work.
USERNAME
must be the same as the value used for the github.user Git variable above. You must append ^forge to that, without any space in between.
TOKEN
is the token you generated earlier.

Set the auth token to fetch the repo data #

Finish by typing M-x auth-source-forget-all-cached RET. If you don’t do this, then Auth-Source may fail to look up the token.


Links to this note

Go to random page

Previous Next