Creating your own metadata repositories - KSP-CKAN/CKAN GitHub Wiki

CKAN supports using multiple metadata repositories. This is useful if you have mods of your own that you wish CKAN managed or want to use prereleases.

  1. First, you will need .netkan files. Refer to Creating your own netkan files.
  2. Once you have one or more such files, download them and place them in a folder.
  3. Download netkan.exe and place it in the same folder.
  4. Open a Command Prompt/Terminal window, navigate to that folder, and type in netkan.exe xxx.netkan (replace xxx with the name of your netkan file) --verbose.
  5. Netkan.exe will attempt to "inflate" the .netkan file, which means it uses the information in said file, to create a .ckan file with information for a specific release of your mod. With the --verbose flag, it prints messages about its progress.
  6. If all is good, it will print a message like this:
Transformation written to .\(mod identifier here)-(mod version here).ckan
  1. Copy the link to this repository
  2. Open CKAN settings
  3. Under "Metadata Repositories", press new. Fill in the name field with anything you want.
  4. Paste the link to your repository, then add /archive/main.tar.gz to the end
  5. When done, the link should look as follows:
https://github.com/(your username)/(your repo name)/archive/main.tar.gz

Close the settings window and update repositories. The new mod should now appear in CKAN. When releasing a new version, run netkan.exe again and add the resulting .ckan to your repository.

If you receive this error:

[1] WARN CKAN.NetKAN.Transformers.GithubTransformer (null) - No releases found for ProgrammerFailure/My-KSP-patches
[1] FATAL CKAN.NetKAN.Program (null) - ProgrammerFailure-KSP-Patches missing required field download

It is likely because your github repository has no assets attached to it (The release has only Source code available to download). You can correct this by adding the following field to your .netkan:

x_netkan_github:
  use_source_archive: true

Alternatively, you may specify a download & version in the netkan manually (see optional overrides in the metadata webtool). If you choose to do this, you will need to change the download & version with each new release, before rerunning netkan.exe.