There are two methods to authenticate GitHub accounts in hgitmap: OAuth and Personal Access Tokens (PATs). This document provides detailed instructions for both methods.
Steps:
- Create a GitHub OAuth App at https://github.com/settings/developers and record your Client ID and Client Secret.
- Application name: Hgitmap
- Homepage URL: Your hgitmap frontend URL (e.g.,
http://localhost:3000or your domain) - Authorization callback URL:
{BACKEND_URL}/oauth/github/callback(replace{BACKEND_URL}with your backend URL, e.g.,http://localhost:8000or your domain)
- In Hgitmap admin panel (
settings/platforms?tab=oauth-apps), add a new OAuth app with the Client ID, Client Secret - In Hgitmap My platforms page(
settings/platforms?tab=platforms), click github OAuth card and authorize the app
Steps:
-
Go to https://github.com/settings/tokens and click "Generate new token"
-
Select the required scopes as follows:
-
repo- Full control of private repositories-
✅ Check the parent
repocheckbox, this automatically includes all sub-options:repo:status- Access commit statusrepo_deployment- Access deployment statuspublic_repo- Access public repositoriesrepo:invite- Access repository invitationssecurity_events- Read and write security events
Alternative (Public repos only):
-
If you only want to track public repository contributions, select only
public_repoinstead
-
-
Expand the
usersection and select ONLY theread:usersub-option, other sub-options not needed:-
read:user- Read ALL user profile datauser:email- Not requireduser:follow- Not required
-
-
-
In Hgitmap My platforms page(
settings/platforms?tab=platforms), click github PAT card and enter the generated token