From f0868f0bf4e44afd58e027d7122784c28c416f45 Mon Sep 17 00:00:00 2001 From: Brent Beer Date: Fri, 11 Sep 2015 10:27:03 -0700 Subject: [PATCH 1/5] every curl needs optional s, and admin port I know we warn about this in a tip in the top, but it's so subtle and easily missed. Is there any reason not to include this elsewhere? --- content/v3/enterprise/management_console.md | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/content/v3/enterprise/management_console.md b/content/v3/enterprise/management_console.md index 370c2176ab..17852c5e42 100644 --- a/content/v3/enterprise/management_console.md +++ b/content/v3/enterprise/management_console.md @@ -24,13 +24,13 @@ You need to pass your [Management Console password](https://help.github.com/ente Use the `api_key` parameter to send this token with each request. For example:
-$ curl -L 'http://hostname/setup/api?api_key=your-amazing-password'
+$ curl -L 'http(s)://hostname:admin_port:admin_port/setup/api?api_key=your-amazing-password'
 
You can also use standard HTTP authentication to send this token. For example:
-$ curl -L 'http://api_key:your-amazing-password@hostname/setup/api'
+$ curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api'
 
## Upload a license for the first time @@ -64,13 +64,13 @@ For a list of the available settings, see [the `/setup/api/settings` endpoint](#
 HTTP/1.1 202 Created
-Location: http://hostname/setup/api/configcheck
+Location: http(s)://hostname:admin_port/setup/api/configcheck
 
### Example
-curl -L -X POST 'http://hostname/setup/api/start' -F license=@/path/to/github-enterprise.ghl -F "password=your-amazing-password" -F settings=</path/to/settings.json
+curl -L -X POST 'http(s)://hostname:admin_port/setup/api/start' -F license=@/path/to/github-enterprise.ghl -F "password=your-amazing-password" -F settings=</path/to/settings.json
 
## Upgrade a license @@ -95,7 +95,7 @@ Location: http://hostname/setup/api/configcheck ### Example
-curl -L -X POST 'http://api_key:your-amazing-password@hostname/setup/api/upgrade'
+curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/upgrade'
 
## Check configuration status @@ -124,7 +124,7 @@ Status | Description ### Example
-curl -L 'http://api_key:your-amazing-password@hostname/setup/api/configcheck'
+curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/configcheck'
 
## Start a configuration process @@ -143,7 +143,7 @@ Location: http://hostname/setup/api/configcheck ### Example
-curl -L -X POST 'http://api_key:your-amazing-password@hostname/setup/api/configure'
+curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/configure'
 
## Retrieve settings @@ -158,7 +158,7 @@ curl -L -X POST 'http://api_key:your-amazing-password@hostname ### Example
-curl -L 'http://api_key:your-amazing-password@hostname/setup/api/settings'
+curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings'
 
## Modify settings @@ -180,7 +180,7 @@ HTTP/1.1 204 No Content ### Example
-curl -L -X PUT 'http://api_key:your-amazing-password@hostname/setup/api/settings' --data-urlencode "settings=`cat /path/to/settings.json`"
+curl -L -X PUT 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings' --data-urlencode "settings=`cat /path/to/settings.json`"
 
## Check maintenance status @@ -197,7 +197,7 @@ Check your installation's maintenance status: ### Example
-curl -L 'http://api_key:your-amazing-password@hostname/setup/api/maintenance'
+curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance'
 
## Enable or disable maintenance mode @@ -224,7 +224,7 @@ The possible values for `when` are `now` or any date parseable by ### Example
-curl -L -X POST 'http://api_key:your-amazing-password@hostname/setup/api/maintenance' -d 'maintenance={"enabled":true, "when":"now"}'
+curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance' -d 'maintenance={"enabled":true, "when":"now"}'
 
## Retrieve authorized SSH keys @@ -239,7 +239,7 @@ curl -L -X POST 'http://api_key:your-amazing-password@hostname ### Example
-curl -L 'http://api_key:your-amazing-password@hostname/setup/api/settings/authorized-keys'
+curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys'
 
## Add a new authorized SSH key @@ -260,7 +260,7 @@ Name | Type | Description ### Example
-curl -L -X POST 'http://api_key:your-amazing-password@hostname/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub
+curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub
 
## Remove an authorized SSH key @@ -281,5 +281,5 @@ Name | Type | Description ### Example
-curl -L -X DELETE 'http://api_key:your-amazing-password@hostname/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub
+curl -L -X DELETE 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub
 
From 74071aff154063012b383f57fcbe97bcb25f22b3 Mon Sep 17 00:00:00 2001 From: Brent Beer Date: Sun, 13 Sep 2015 14:16:40 -0700 Subject: [PATCH 2/5] remove (s) from curl commands --- content/v3/enterprise/management_console.md | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/content/v3/enterprise/management_console.md b/content/v3/enterprise/management_console.md index 17852c5e42..a5ddc5699e 100644 --- a/content/v3/enterprise/management_console.md +++ b/content/v3/enterprise/management_console.md @@ -24,13 +24,13 @@ You need to pass your [Management Console password](https://help.github.com/ente Use the `api_key` parameter to send this token with each request. For example:
-$ curl -L 'http(s)://hostname:admin_port:admin_port/setup/api?api_key=your-amazing-password'
+$ curl -L 'http://hostname:admin_port:admin_port/setup/api?api_key=your-amazing-password'
 
You can also use standard HTTP authentication to send this token. For example:
-$ curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api'
+$ curl -L 'http://api_key:your-amazing-password@hostname:admin_port/setup/api'
 
## Upload a license for the first time @@ -64,13 +64,13 @@ For a list of the available settings, see [the `/setup/api/settings` endpoint](#
 HTTP/1.1 202 Created
-Location: http(s)://hostname:admin_port/setup/api/configcheck
+Location: http://hostname:admin_port/setup/api/configcheck
 
### Example
-curl -L -X POST 'http(s)://hostname:admin_port/setup/api/start' -F license=@/path/to/github-enterprise.ghl -F "password=your-amazing-password" -F settings=</path/to/settings.json
+curl -L -X POST 'http://hostname:admin_port/setup/api/start' -F license=@/path/to/github-enterprise.ghl -F "password=your-amazing-password" -F settings=</path/to/settings.json
 
## Upgrade a license @@ -95,7 +95,7 @@ Location: http://hostname/setup/api/configcheck ### Example
-curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/upgrade'
+curl -L -X POST 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/upgrade'
 
## Check configuration status @@ -124,7 +124,7 @@ Status | Description ### Example
-curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/configcheck'
+curl -L 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/configcheck'
 
## Start a configuration process @@ -143,7 +143,7 @@ Location: http://hostname/setup/api/configcheck ### Example
-curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/configure'
+curl -L -X POST 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/configure'
 
## Retrieve settings @@ -158,7 +158,7 @@ curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname -curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings' +curl -L 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/settings' ## Modify settings @@ -180,7 +180,7 @@ HTTP/1.1 204 No Content ### Example
-curl -L -X PUT 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings' --data-urlencode "settings=`cat /path/to/settings.json`"
+curl -L -X PUT 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/settings' --data-urlencode "settings=`cat /path/to/settings.json`"
 
## Check maintenance status @@ -197,7 +197,7 @@ Check your installation's maintenance status: ### Example
-curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance'
+curl -L 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance'
 
## Enable or disable maintenance mode @@ -224,7 +224,7 @@ The possible values for `when` are `now` or any date parseable by ### Example
-curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance' -d 'maintenance={"enabled":true, "when":"now"}'
+curl -L -X POST 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance' -d 'maintenance={"enabled":true, "when":"now"}'
 
## Retrieve authorized SSH keys @@ -260,7 +260,7 @@ Name | Type | Description ### Example
-curl -L -X POST 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub
+curl -L -X POST 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub
 
## Remove an authorized SSH key @@ -281,5 +281,5 @@ Name | Type | Description ### Example
-curl -L -X DELETE 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub
+curl -L -X DELETE 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub
 
From 277d62fa76050b3547c339a747ddef747a19a6d7 Mon Sep 17 00:00:00 2001 From: Brent Beer Date: Sun, 13 Sep 2015 14:18:47 -0700 Subject: [PATCH 3/5] response location should be 'd and have admin_port --- content/v3/enterprise/management_console.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/v3/enterprise/management_console.md b/content/v3/enterprise/management_console.md index a5ddc5699e..4bc2b75fc8 100644 --- a/content/v3/enterprise/management_console.md +++ b/content/v3/enterprise/management_console.md @@ -89,7 +89,7 @@ Name | Type | Description
 HTTP/1.1 202 Accepted
-Location: http://hostname/setup/api/configcheck
+Location: http://hostname:admin_port/setup/api/configcheck
 
### Example @@ -137,7 +137,7 @@ This endpoint allows you to start a configuration process at any time:
 HTTP/1.1 202 Accepted
-Location: http://hostname/setup/api/configcheck
+Location: http://hostname:admin_port/setup/api/configcheck
 
### Example From 8630086753d1672566d592a4c0335dd8b35a661b Mon Sep 17 00:00:00 2001 From: Brent Beer Date: Sun, 13 Sep 2015 14:19:47 -0700 Subject: [PATCH 4/5] forgot to remove the last (s) --- content/v3/enterprise/management_console.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v3/enterprise/management_console.md b/content/v3/enterprise/management_console.md index 4bc2b75fc8..e4450f54e1 100644 --- a/content/v3/enterprise/management_console.md +++ b/content/v3/enterprise/management_console.md @@ -239,7 +239,7 @@ curl -L -X POST 'http://api_key:your-amazing-password@hostname ### Example
-curl -L 'http(s)://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys'
+curl -L 'http://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys'
 
## Add a new authorized SSH key From 83f0f99c52e6e6ef9204a4b72e04d0b12600168c Mon Sep 17 00:00:00 2001 From: Brent Beer Date: Mon, 14 Sep 2015 10:37:26 -0700 Subject: [PATCH 5/5] remove duplicate admin_port --- content/v3/enterprise/management_console.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v3/enterprise/management_console.md b/content/v3/enterprise/management_console.md index e4450f54e1..d5056ac154 100644 --- a/content/v3/enterprise/management_console.md +++ b/content/v3/enterprise/management_console.md @@ -24,7 +24,7 @@ You need to pass your [Management Console password](https://help.github.com/ente Use the `api_key` parameter to send this token with each request. For example:
-$ curl -L 'http://hostname:admin_port:admin_port/setup/api?api_key=your-amazing-password'
+$ curl -L 'http://hostname:admin_port/setup/api?api_key=your-amazing-password'
 
You can also use standard HTTP authentication to send this token. For example: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy