Authentication¶
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 GitHub repository, you will need to authenticate with GitHub.
This page covers the authentication options for git-spice.
Logging in¶
To authenticate with GitHub, run:
gs auth login
This will present you with a list of authentication methods.
See Authentication methods for details on what to expect from each method, or skip on to Pick an authentication method.
Authentication methods¶
git-spice provides several ways to authenticate with GitHub.
OAuth¶
With OAuth authentication, you will take the following steps:
- Authenticate yourself on github.com in your browser.
- Authorize git-spice to act on your behalf on the current device only.
Two options are available for OAuth:
- OAuth: grants access to all repositories, public and private.
- OAuth: Public repositories only: grants access to public repositories only.
For more granular control, 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. If that is not an option, use a Personal Access Token.
GitHub App¶
With GitHub App authentication, you will take the following steps:
- Authenticate yourself on github.com in your browser.
- Authorize git-spice to act on your behalf on the current device only.
- Install the git-spice GitHub App on the repositories you want to use git-spice with.
Important: Authentication alone does not grant any access. You must install the GitHub App to access repositories with git-spice.
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 GitHub App. If that is not an option, use a Personal Access Token.
Personal Access Token¶
To use a Personal Access Token with git-spice, you will generate a Personal Access Token on GitHub and enter it in the prompt.