Skip to main content
Skip table of contents

Cloud Repository Integrations - Hosting a Unified Agent Configuration File on GitHub.com

This article will describe how you can host a custom configuration file on GitHub.com. This article will specifically describe how to host a whitesource.config file for use with our Repository Integration for GitHub.com’s external configuration mode.

Problem:

You have installed our GitHub.com Repository Integration and have onboarded several repositories that require the same configuration file. Instead of setting the parameter ‘configMode’ to ‘LOCAL’ and creating a whitesource.config file for each repository, you would like each repository to use the same whitesource.config file to reduce configuration file maintenance.

Solution:

  1. Create a new GitHub repository dedicated to your configuration. You can name this repository ‘whitesource-configuration’.

  2. Add your whitesource.config file to the root of the main branch of ‘whitesource-configuration’.

  3. In the ‘whitesource-configuration’ repo, go to Settings > Pages > Source, and then select ‘Main’.

  4. Click Save

  5. At the top of the page you should see a message that says "Your site is ready to be published at <url>. Copy this URL. It should look something like https://<githubUserName>.github.io/whitesource-configuration/

  6. For each repository that needs to use this configuration file, open each repository's .whitesource file and change the following parameters:

    CODE
        "configMode": "EXTERNAL",
        "configExternalURL": "https://<githubUserName>.github.io/whitesource-configuration/whitesource.config",

Where ‘configExternalURL’ is set to the URL copied in step 5.

Notes:

These instructions make use of GitHub's Pages feature. Pages are available for all public repositories. Pages are available for private repositories if you are licensed for GitHub Enterprise Cloud.

To find more information about GitHub Pages please visit the GitHub Pages Website.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.