git-spice is offline-first.
It does not require authentication for local stacking operations.
However, once you want to push or pull changes to/from a remote repository,
you will need to authenticate with the respective service.
This page covers methods to authenticate git-spice with GitHub and GitLab.
Note that GitLab support requires at least version v0.9.0.
With OAuth authentication, you will take the following steps:
Authenticate yourself on the service website in your browser.
Authorize git-spice to act on your behalf on the current device only.
$ gs auth loginSelect an authentication method: OAuth1. Visit https://github.com/login/device2. Enter code: ABCD-1234The code expires in a few minutes.It will take a few seconds to verify after you enter it.
On GitHub, OAuth is available in two flavors:
OAuth: grants access to all repositories, public and private.
OAuth: Public repositories only:
grants access to public repositories only.
For more granular control than that,
use GitHub App authentication.
Note
For private repositories owned by organizations,
you will need a member with administrative access to the repository
to allow installation of the git-spice OAuth App.
For Self-Hosted GitLab instances,
an administrator will need to set up a git-spice OAuth App.
Be sure to uncheck the "Confidential" option when creating the App.