diff --git a/content/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities.md b/content/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities.md index e83909ffcf..fe97ef6799 100644 --- a/content/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities.md +++ b/content/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities.md @@ -1132,6 +1132,67 @@ This utility rewrites the imported repository. This gives you a chance to rename git-import-rewrite ``` +{% ifversion ghes > 3.12 %} + +## License + +### ghe-license + +This utility lets you interact with your current active license, or with new licenses without needing to import them first. You can also directly apply the license to make the changes effective using `--apply`. Applying changes with the `ghe-license` utility avoids a configuration run and only restarts the affected services. + +You can review the possible commands and flags using `ghe-license -h`. + +Alternatively, you can manage licenses using the REST API or the {% data variables.product.prodname_cli %}. See "[AUTOTITLE](/rest/enterprise-admin/manage-ghes)" and "[AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/administering-your-instance-using-the-github-cli)." + +Display license information. Alternatively, use the `-j` flag for JSON formatting. + +```shell +ghe-license info +# "advanced_security_enabled" : true +# "advanced_security_seats" : 0 +# "cluster_support" : false +# "company" : "GitHub" +# "croquet_support" : true +# "custom_terms" : true +# "evaluation" : false +# "expire_at" : "2025-01-01T23:59:59-08:00" +# "insights_enabled" : true +# "insights_expire_at" : "2025-01-01T23:59:59.999-08:00" +# "learning_lab_evaluation_expires" : "2023-01-01T23:59:59.000-08:00" +# "learning_lab_seats" : 100 +# "perpetual" : false +# "reference_number" : "123456" +# "seats" : 0 +# "ssh_allowed" : true +# "support_key" : null +# "unlimited_seating" : true +``` + +Check the license. + +```shell +ghe-license check +# License is valid. +``` + +All commands are performed on the existing license. However, you can also provide a license from STDOUT using `--pipe`. + +```shell +cat license | ghe-license import --pipe +# License imported at /data/user/common/enterprise.ghl. +# License synchronized. +``` + +You can also provide a license by assigning a file path to the `GHE_LICENSE_FILE` environment variable. + +```shell +GHE_LICENSE_FILE=/path/license ghe-license import +# License imported at /data/user/common/enterprise.ghl. +# License synchronized. +``` + +{% endif %} + ## Security ### ghe-find-insecure-git-operations @@ -1314,14 +1375,14 @@ ghe-upgrade-scheduler -r UPGRADE PACKAGE FILENAME ## User management -### ghe-license-usage +### {% ifversion ghes > 3.12 %}ghe-license usage{% else %}ghe-license-usage{% endif %} This utility exports a list of the installation's users in JSON format. If your instance is connected to {% data variables.product.prodname_ghe_cloud %}, {% data variables.product.prodname_ghe_server %} uses this information for reporting licensing information to {% data variables.product.prodname_ghe_cloud %}. For more information, see "[AUTOTITLE](/admin/configuration/configuring-github-connect/managing-github-connect)." -By default, the list of users in the resulting JSON file is encrypted. Use the `-h` flag for more options. +By default, the list of users in the resulting JSON file is encrypted. {% ifversion ghes > 3.12 %}Review optional flags via `ghe-license --help`{% else %}Use the `-h` flag for more options{% endif %}. ```shell -ghe-license-usage +{% ifversion ghes > 3.12 %}ghe-license usage{% else %}ghe-license-usage{% endif %} ``` ### ghe-org-membership-update diff --git a/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md b/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md index b7c168df3b..eff5807336 100644 --- a/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md +++ b/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md @@ -16,13 +16,15 @@ After you purchase or upgrade a license for {% data variables.product.prodname_e {% data reusables.enterprise-licensing.contact-sales-for-renewals-or-seats %} -## Uploading your license to {% data variables.location.product_location_enterprise %} +## Uploading your license from the {% data variables.enterprise.management_console %} +{% ifversion ghes < 3.13 %} {% warning %} **Warning:** Updating your license causes a small amount of downtime for {% data variables.location.product_location %}. {% endwarning %} +{% endif %} 1. Sign into {% data variables.location.product_location_enterprise %} as a site administrator. {% data reusables.enterprise-accounts.access-enterprise %} @@ -34,4 +36,22 @@ After you purchase or upgrade a license for {% data variables.product.prodname_e 1. To upload your license, click **License file**, or drag your license file onto **License file**. ![Screenshot of the "License" page of the Management Console. A link, labeled "License file", is highlighted with an orange outline.](/assets/images/enterprise/management-console/upload-license.png) -1. Click **Upload**. +1. Click **Upload**.{% ifversion ghes > 3.12 %} Your license will be updated in the background. The change may take a few minutes before it is visible on your instance.{% endif %} + +{% ifversion ghes > 3.12 %} + +## Uploading your license with the REST API + +You can use the REST API to upload a license to {% data variables.location.product_location %}. See "[AUTOTITLE](/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license)." + +## Uploading a license with the {% data variables.product.prodname_cli %} + +You can import a license to {% data variables.location.product_location %} using the `gh es` extension of the {% data variables.product.prodname_cli %}. See the [usage instructions](https://github.com/github/gh-es/blob/main/USAGE.md#gh-es-config-import-license) in the `github/gh-es` repository on {% data variables.product.prodname_dotcom_the_website %}. + +For more information about accessing your instance via the extension, see "[AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/administering-your-instance-using-the-github-cli)." + +## Uploading a license via SSH + +You can upload and interact with your license from the command line via SSH. See the documentation for the `ghe-license` command in "[AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-license)." For more information about accessing your instance via SSH, see "[AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/accessing-the-administrative-shell-ssh)." + +{% endif %}