Skip to content

Instantly share code, notes, and snippets.

@PeterWhittaker
Last active August 20, 2020 14:21
Show Gist options
  • Select an option

  • Save PeterWhittaker/b74b1004f2d66acfc16293f2a3acea19 to your computer and use it in GitHub Desktop.

Select an option

Save PeterWhittaker/b74b1004f2d66acfc16293f2a3acea19 to your computer and use it in GitHub Desktop.

Revisions

  1. PeterWhittaker revised this gist Aug 20, 2020. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions ghiAuthToken.md
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,11 @@ isn't exactly clear.

    Here's the simple, three-step recipe:
    1. Go to the [GitHub new personal access token page](https://github.com/settings/tokens/new) (you will need your GitHub password)
    1. Enter a useful, memorable title, e.g., **For GHI at the CLI**
    2. Select **repo** scope
    3. At the bottom of the page, click *Generate Token*
    1. Enter a useful, memorable title, e.g., **For GHI at the CLI**
    2. Select **repo** scope
    3. At the bottom of the page, click *Generate Token*
    2. Copy or otherwise make note the token - you will **never see it again**, make sure you do this correctly.
    3. At the command line on your favourite development machine, run the command `git config --global ghi.token <token>`,
    replacing *<token>* with the token from step 2.
    replacing *<token>* with the token from step 2.

    That should do it.
  2. PeterWhittaker revised this gist Aug 20, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghiAuthToken.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ so authorization tokens are required; while this is more-or-less covered in the
    isn't exactly clear.

    Here's the simple, three-step recipe:
    1. Go to the [GitHub new authorization token page](https://github.com/settings/tokens/new) (you will need your GitHub password)
    1. Go to the [GitHub new personal access token page](https://github.com/settings/tokens/new) (you will need your GitHub password)
    1. Enter a useful, memorable title, e.g., **For GHI at the CLI**
    2. Select **repo** scope
    3. At the bottom of the page, click *Generate Token*
  3. PeterWhittaker created this gist Aug 20, 2020.
    16 changes: 16 additions & 0 deletions ghiAuthToken.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    ### Using GitHub Auth Tokens with ghi

    I'm using [ghi to manage GitHub issues from the command line](https://github.com/stephencelis/ghi).
    ghi uses the GitHub API, which is HTTPS-only (not SSH), which means I cannot use my SSH keys to
    authenticate my ghi requests. GitHub is [deprecating password authentication](https://developer.github.com/changes/2020-02-14-deprecating-password-auth/)
    so authorization tokens are required; while this is more-or-less covered in the ghi docs, it
    isn't exactly clear.

    Here's the simple, three-step recipe:
    1. Go to the [GitHub new authorization token page](https://github.com/settings/tokens/new) (you will need your GitHub password)
    1. Enter a useful, memorable title, e.g., **For GHI at the CLI**
    2. Select **repo** scope
    3. At the bottom of the page, click *Generate Token*
    2. Copy or otherwise make note the token - you will **never see it again**, make sure you do this correctly.
    3. At the command line on your favourite development machine, run the command `git config --global ghi.token <token>`,
    replacing *<token>* with the token from step 2.