About registering GitHub Apps
You can register a GitHub App under your personal account, under an organization that you own, or under an organization that has granted you permission to manage all apps owned by the organization. For more information, see "Добавление и удаление руководителей Приложение GitHub в организации."
Пользователь или организация могут зарегистрировать до 100 GitHub Apps, но нет ограничений на количество GitHub Apps, которые можно установить в учетной записи.
Registering a GitHub App
-
Перейдите к настройкам учетной записи.
-
Для приложения GitHub App, принадлежащего учетной записи пользователя, нажмите на фото своего профиля в правом верхнем углу любой страницы и выберите Настройки.
-
Для приложения GitHub App, принадлежащего организации, нажмите на фото своего профиля в правом верхнем углу любой страницы и выберите Ваши организации. Затем нажмите Настройки справа от организации.
-
-
На левой боковой панели щелкните Параметры разработчика.
-
На левой боковой панели щелкните GitHub Apps.
-
Click New GitHub App.
-
Under "GitHub App name", enter a name for your app. You should choose a clear and short name. Your app's name (converted to lowercase, with spaces replaced by
-
, and with special characters replaced) will be shown in the user interface when your app takes an action. For example,My APp Näme
would display asmy-app-name
.The name must be unique across GitHub. You cannot use same name as an existing GitHub account, unless it is your own user or organization name.
-
Optionally, under "Description", type a description of your app. Users and organizations will see this description when they install your app.
-
Under "Homepage URL", type the full URL to your app's website. If you don’t have a dedicated URL and your app's code is stored in a public repository, you can use that repository URL. Or, you can use the URL of the organization or user that owns the app.
-
Optionally, under "Callback URL", enter the full URL to redirect to after a user authorizes the installation.
You can enter up to 10 callback URLs. To add additional callback URLs, click Add callback URL.
If your app does not need to act on behalf of a user (does not need to generate a user access token), this field will be ignored. If your app uses device flow instead of web application flow to generate a user access token, this field will be ignored.
For more information about the callback URL, see "Сведения о URL-адресе обратного вызова авторизации пользователя." For more information about generating a user access token to act on behalf of a user, see "Проверка подлинности с помощью Приложение GitHub от имени пользователя" and "Создание маркера доступа пользователя для Приложение GitHub."
-
Optionally, to prevent user access tokens from expiring, deselect Expire user authorization tokens. GitHub strongly recommends that you leave this option selected. For more information about refreshing expired tokens and the benefits of user access tokens that expire, see "Обновление маркеров доступа пользователей." If your app does not need to generate a user access token, this field will be ignored.
-
Optionally, to prompt users to authorize your app when they install it, select Request user authorization (OAuth) during installation. If a user authorizes your app, your app can generate a user access token to make API requests on the user's behalf and attribute app activity to the user. For more information, see "Проверка подлинности с помощью Приложение GitHub от имени пользователя" and "Создание маркера доступа пользователя для Приложение GitHub."
-
Optionally, if you want to use device flow to generate a user access token, select Enable Device Flow. For more information, see "Создание маркера доступа пользователя для Приложение GitHub."
-
Optionally, under "Setup URL", enter the URL to redirect users to after they install your app. If additional setup is required after installation, you can use this URL to tell users what steps to take after installation. For more information, see "Сведения о URL-адресе установки."
If you selected Request user authorization (OAuth) during installation in an earlier step, you will not be able to enter a URL here. Users will instead be redirected to the Callback URL as part of the authorization flow, where you can describe additional setup.
-
Optionally, if you want to redirect users to the setup URL after they update an installation, select Redirect on update. An update includes adding or removing a repository for an installation. If "Setup URL" is blank, this will be ignored.
-
Optionally, if you do not want your app to receive webhook events, deselect Active. For example, if your app will only be used for authentication or does not need to respond to webhooks, deselect this option. For more information, see "Использование веб-перехватчиков с приложениями GitHub."
-
If you selected Active in the previous step, under "Webhook URL", enter the URL that GitHub should send webhook events to. For more information, see "Использование веб-перехватчиков с приложениями GitHub."
-
Optionally, if you selected Active in the previous step, under "Webhook secret", enter a secret token to secure your webhooks. GitHub highly recommends that you set a webhook secret. For more information, see "Использование веб-перехватчиков с приложениями GitHub."
-
If you entered a webhook URL, under "SSL verification", select whether to enable SSL verification. GitHub highly recommends that you enable SSL verification.
-
Under "Permissions", choose the permissions that your app needs. For each permission, select the dropdown menu and click Read-only, Read & write, or No access. You should select the minimum permissions necessary for your app. For more information, see "Выбор разрешений для Приложение GitHub."
-
If you selected Active in the earlier step to indicate that your app should receive webhook events, under "Subscribe to events", select the webhook events that you want your app to receive. The permissions that you selected in the previous step determine what webhook events are available. For more information about each webhook event, see "События и полезные данные веб-перехватчика."
-
Under "Where can this GitHub App be installed?", select Only on this account or Any account. For more information on installation options, see "Преобразование приложения GitHub в общедоступное или частное."
-
Click Create GitHub App.
Next steps
After registering a GitHub App, you will want to write code to make your GitHub App do something. For examples of how to write code, see:
- "Quickstart for building GitHub Apps"
- "Создание Приложение GitHub, реагирующего на события веб-перехватчика"
- "Создание кнопки "Вход с помощью GitHub" с Приложение GitHub"
- "Создание интерфейса командной строки с помощью Приложение GitHub"
- "Выполнение запросов API с проверкой подлинности с помощью Приложение GitHub в рабочем процессе GitHub Actions"
You should aim to follow best practices. For more information, see "Рекомендации по созданию Приложение GitHub."
Once your GitHub App is fully built, you can install your GitHub App and share your GitHub App with others. For more information, see "Установка собственного Приложение GitHub" and "Предоставление общего доступа к Приложение GitHub."
You can always make changes to the settings for your GitHub App. For more information, see "Изменение регистрации Приложение GitHub."