This repository was archived by the owner on Nov 1, 2017. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork1.1k
Add -k flag and https to 2 examples#933
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
7 commits Select commitHold shift + click to select a range
3aa3220
Add -k flag and https to 2 examples
mellybess1bfd074
reorder -k for new key and uploading a license
mellybessb931827
add note about -k flag, remove from examples
mellybess4a91f27
add curl caveat and update language
mellybessb5a405c
update all examples to https
mellybess7055fe3
fix typo
08af3ae
add link re: -k flag and move note to tip section
mellybessFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
30 changes: 16 additions & 14 deletionscontent/v3/enterprise/management_console.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -14,22 +14,24 @@ You must explicitly set the port number when making API calls to the Management | ||
If you don't want to provide a port number, you'll need to configure your tool to automatically follow redirects. | ||
You may also need to add the [`-k` flag](http://curl.haxx.se/docs/manpage.html#-k) when using `curl`, since GitHub Enterprise uses a self-signed certificate before you [add your own SSL certificate](https://help.github.com/enterprise/admin/guides/installation/dns-hostname-subdomain-isolation-and-ssl/#ssl). | ||
{{/tip}} | ||
## Authentication | ||
You need to pass your [Management Console password](https://help.github.com/enterprise/admin/articles/accessing-the-management-console/) as an authentication token to every Management Console API endpoint except [`/setup/api/start`](#upload-a-license-for-the-first-time). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Great catch! | ||
Use the `api_key` parameter to send this token with each request. For example: | ||
``` command-line | ||
$ curl -L 'https://<em>hostname</em>:<em>admin_port</em>/setup/api?api_key=<em>your-amazing-password</em>' | ||
``` | ||
You can also use standard HTTP authentication to send this token. For example: | ||
``` command-line | ||
$ curl -L 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api' | ||
``` | ||
## Upload a license for the first time | ||
@@ -69,7 +71,7 @@ For a list of the available settings, see [the `/setup/api/settings` endpoint](# | ||
### Example | ||
``` command-line | ||
$ curl -L -X POST 'https://<em>hostname</em>:<em>admin_port</em>/setup/api/start' -F license=@<em>/path/to/github-enterprise.ghl</em> -F "password=<em>your-amazing-password</em>" -F settings=<<em>/path/to/settings.json</em> | ||
``` | ||
## Upgrade a license | ||
@@ -94,7 +96,7 @@ Name | Type | Description | ||
### Example | ||
``` command-line | ||
$ curl -L -X POST 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/upgrade' | ||
``` | ||
## Check configuration status | ||
@@ -123,7 +125,7 @@ Status | Description | ||
### Example | ||
``` command-line | ||
$ curl -L 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/configcheck' | ||
``` | ||
## Start a configuration process | ||
@@ -142,7 +144,7 @@ This endpoint allows you to start a configuration process at any time for your u | ||
### Example | ||
``` command-line | ||
$ curl -L -X POST 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/configure' | ||
``` | ||
## Retrieve settings | ||
@@ -157,7 +159,7 @@ $ curl -L -X POST 'http://api_key:<em>your-amazing-password</em>@<em>hostname</e | ||
### Example | ||
``` command-line | ||
$ curl -L 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings' | ||
``` | ||
## Modify settings | ||
@@ -179,7 +181,7 @@ Name | Type | Description | ||
### Example | ||
``` command-line | ||
$ curl -L -X PUT 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings' --data-urlencode "settings=`cat /path/to/settings.json`" | ||
``` | ||
## Check maintenance status | ||
@@ -196,7 +198,7 @@ Check your installation's maintenance status: | ||
### Example | ||
``` command-line | ||
$ curl -L 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/maintenance' | ||
``` | ||
## Enable or disable maintenance mode | ||
@@ -223,7 +225,7 @@ The possible values for `when` are `now` or any date parseable by | ||
### Example | ||
``` command-line | ||
$ curl -L -X POST 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/maintenance' -d 'maintenance=<em>{"enabled":true, "when":"now"}</em>' | ||
``` | ||
## Retrieve authorized SSH keys | ||
@@ -238,7 +240,7 @@ $ curl -L -X POST 'http://api_key:<em>your-amazing-password</em>@<em>hostname</e | ||
### Example | ||
``` command-line | ||
$ curl -L 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys' | ||
``` | ||
## Add a new authorized SSH key | ||
@@ -259,7 +261,7 @@ Name | Type | Description | ||
### Example | ||
``` command-line | ||
$ curl -L -X POST 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys' -F authorized_key=@<em>/path/to/key.pub</em> | ||
``` | ||
## Remove an authorized SSH key | ||
@@ -280,5 +282,5 @@ Name | Type | Description | ||
### Example | ||
``` command-line | ||
$ curl -L -X DELETE 'https://api_key:<em>your-amazing-password</em>@<em>hostname</em>:<em>admin_port</em>/setup/api/settings/authorized-keys' -F authorized_key=@<em>/path/to/key.pub</em> | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.