This topic describes how to generate a personal access token in GitHub Enterprise that is needed for authentication when using a Go remote repository to proxy your private GitHub Enterprise registry.
To generate a personal access token in GitHub Enterprise:
Log in to your GitHub Enterprise account.
Click your profile photo in the upper-right corner and select User settings from the menu.
From the sidebar menu on the left, click Developer settings.
Select Personal access tokens > Tokens (classic).
Click Generate new token.
[optional] In the Note field, add a description.
In the Expiration field, configure when the personal access token will expire [recommended].
In the Select scopes field, select the repo checkbox to assign this set of permissions to the personal access token.
[optional] Select additional permissions, if required by your environment.
Click Generate Token.