Skip to content

Authentication

GitHub Organization Tools requires authentication to access the GitHub API, which is achieved using Personal Access Tokens (PAT).

The application will try to authenticate using gh, the GitHub CLI tool. If gh is not available, you will be prompted to enter your PAT manually.

Required Scopes

Different commands require different scopes:

Command Required Scope Description
Managing Users admin:org Invite or remove users from an organization
Repository Operations delete_repo Delete repositories

Storing the Token

When using GitHub CLI tool, the token is stored automatically by gh.

If not, ghot can store the token in the system keyring if the user allows it when prompted to do so.

Enter your GitHub Personal Access Token: <token>
Save this token for future use? (y/n): y

Logging In

You can log in by running the command:

ghot auth login

Checking Authentication

You can check if you are authenticated by running the following command:

ghot auth check

If not authenticated, you will be prompted to enter your GitHub Personal Access Token.

Removing the Token

You can remove the token from the keyring by running the following command:

ghot auth remove

Printing the Token

You can print the token to the console by running the following command:

ghot auth print