Skip to content

Adding a GitHub API authtoken

Myk edited this page Jan 31, 2018 · 4 revisions

Adding a GitHub authtoken

CKAN v 1.24.0 adds the ability to store and use personal authorisation tokens for accessing download sites. The first downloads that will be configured to use these tokens are for GitHub hosted mods.

Generate a GitHub token

  • If you do not already have one, create a GitHub user account
  • Navigate to your GitHub Settings page (the rightmost drop-down on the GitHub top bar will get you to Settings)
  • Go to Developer Settings (near the bottom of the page)
  • Select "personal access tokens" on the left
  • Click on "Generate new token"
  • Enter a Token description eg "CKAN Client"
  • In the scopes area, select only public_repo
  • Click on "Generate token"
  • You will now see a long hexadecimal string at the top of a list of any other authorisation tokens you may have generated for other purposes.
  • Click on the little "copy token" clipboard icon to put the token into your clipboard.
  • Launch the CKAN GUI, choosing any KSP instance you like. The tokens are not specific to a KSP instance.
  • Click on Settings -> CKAN Settings
  • In the "Authentication Tokens" box, click New
  • Enter github.com in the Host box
  • Paste the token from the GitHub "Personal access tokens" page.
  • Click "Accept"

You will now use your own authentication token when downloading any mods where the metadata is configured for API download, which will prevent you being speed-limited as an un-authenticated user.

For more ways to add an authentication token to your CKAN client, see this pull request

Clone this wiki locally