Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Add -k flag and https to 2 examples#933

Merged
pengwynn merged 7 commits intomasterfrommanagement-console-update
Jan 4, 2016

Conversation

mellybess
Copy link
Contributor

In a recent customer question (in Front, so no thread available 😦)@davideg@brainstarr and I found that the example commands were missing a-k flag, and needed to be via https. The steps we documented for the customer arehere.

I'm not sure if this needs to be updated for each example on the page, but I can test that if needed.

I also removed a version number from a link to the Enterprise docs so that it redirects to the latest version.

/cc @github/api, @github/docs-platform, and @github/copy

@@ -69,7 +69,7 @@ For a list of the available settings, see [the `/setup/api/settings` endpoint](#
### Example

``` command-line
$ curl -L -X POST 'http://<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=&lt;<em>/path/to/settings.json</em>
$ curl -L -X-kPOST '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=&lt;<em>/path/to/settings.json</em>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think the flag order might matter here sincePOST is an argument to-X. Should this be-X POST -k ...?

@@ -69,7 +69,7 @@ For a list of the available settings, see [the `/setup/api/settings` endpoint](#
### Example

``` command-line
$ curl -L -X POST'http://<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=&lt;<em>/path/to/settings.json</em>
$ curl -L -X POST-k '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=&lt;<em>/path/to/settings.json</em>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is allowing insecure connections something you'd want to promote via documentation? Passing in the-k flag will ignore any SSL warnings (such as mismatching certificates) and allow the connection to proceed anyway which has some potential security concerns. Personally, if I was sending my GitHub license or credentials across the wire I'd definitely like to ensure the host I am connecting to is who I intend it to be. However, on the flip side of that, I do realise a lot of places that setup on their internal network won't bother with valid certificates so¯\_(ツ)_/¯.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@jacobbednarz GitHub Enterprise provides a self-signed certificate. For many, I assume the lack of-k blocks these admins from usingcurl to work with the API.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Enterprise customers should configure a proper certificate though and that is strongly recommended. I would be in favor of not adding-k and only add a comment for using it if absolutely necessary. Always adding as a blanket solution is not a good idea.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍 I think adding a comment explaining the-k option is the right approach.

@gjtorikian
Copy link
Contributor

I'm not sure if this needs to be updated for each example on the page, but I can test that if needed.

I just tested it; looks likecurl to HTTP willnot work. I usedthe maintenance settings check as it's one of the fewGET requests on there.

I didnot pass-k, but I don't really know the intricacies of the cert dance. It's interesting to note also that this was pointed out toneed to be HTTPS but we didn't change it. 😓

If you could change the other examples tohttps that would be great! I am not sure if they need-k or not but verifying that would be cool. 👍

@@ -47,6 +47,8 @@ When using this endpoint, your Enterprise instance must have a password set. Thi
1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password.
2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter.

You may also need to use the `-k` flag, as GitHub Enterprise uses a self-signed certificate before you [enable your own SSL certificate](https://help.github.com/enterprise/admin/guides/installation/dns-hostname-subdomain-isolation-and-ssl/#ssl).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I would make it clear that the-k flag applies to using curl.

@mellybess
Copy link
ContributorAuthor

I've added a note about needing the -k flag and updated http to https in the examples.

@pengwynn @github/docs-platform @github/copy is this 👍 to merge?

s/sicne/since/
@@ -47,6 +47,8 @@ When using this endpoint, your Enterprise instance must have a password set. Thi
1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password.
2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter.

You may also need to add the `-k` flag 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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@mellybess I would add a small bit about what the-k flag does or at least add a link tohttp://curl.haxx.se/docs/manpage.html#-k (not sure if linking out to external pages in these docs is cool or not).

Also since this tip applies when using any self-signed certificate it could apply to all endpoints. I'm wondering if it would make sense to move it up towards the top of the document after the tip section.

pengwynn added a commit that referenced this pull requestJan 4, 2016
@pengwynnpengwynn merged commit309e10b intomasterJan 4, 2016
@pengwynnpengwynn deleted the management-console-update branchJanuary 4, 2016 18:04
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@mellybess@gjtorikian@pengwynn@dbussink@jacobbednarz@davideg

[8]ページ先頭

©2009-2025 Movatter.jp