GitHub

Only organization Admins can create, edit and delete integrations.

Link your model objects to reality, such as code repos, branches, folders and files. When those links move, change names or get deleted, weโ€™ll notify you that the object may need to be updated in your IcePanel landscape.

Learn more here: Linking to reality

Using GitHub

Setting up GitHub

  1. From your landscape homepage, click on the organization dropdown at the top of the navigation bar

  2. Click on the Manage link for the organization you want to setup

  3. Go to the Integrations tab

  4. Click on the New integration button and select GitHub

  5. Log in to GitHub and install IcePanel as an app (you may need a GitHub admin to approve the app installation)

  6. Select the repos or branches you wish to give access to

  7. Accept to install

  8. You should now see your code repos in the Links section of an object

Unlinking your GitHub

You can unlink the integration from IcePanel or GitHub.

  1. Log into GitHub from an account that has access to the linked repo

  2. Go to your Settings

  3. Go to the Applications tab on the left

  4. Make sure you are on the Installed GitHub Apps tab

  5. Click Configure on IcePanel in that list

  6. Click Uninstall in the Danger zone.

Whitelist the IcePanel repo scanner

You may find that no code repos show if your organization has enabled IP filtering or whitelisting in your BitBucket Server instance. To resolve this whitelist the IcePanel repo scanner IP address:

34.168.47.236

Using self-hosted GitHub

IcePanel uses access tokens to authenticate with self-hosted GitHub instances.

  1. Create one of the following GitHub access tokens with repo scopes.

  2. Navigate to API keys in IcePanel by clicking Manage in the organization dropdown

  3. Create an API key with admin permissions

  4. Run the IcePanel CLI docker image in github-sync mode with the following parameters

โ €docker run icepanel/cli github-sync \\
  --api-key $ICEPANEL_KEY \\
  --url <https://github.com> \\
  --token $GITHUB_TOKEN

Or with environment variables.

docker run \\
  -e API_KEY=$ICEPANEL_KEY \\
  -e GITHUB_URL=https://github.com \\
  -e GITHUB_TOKEN=$GITHUB_TOKEN \\
  icepanel/cli github-sync
  1. Once the synchronization is complete you should see your code repos in the IcePanel reality tab.

CLI command reference

Usage: IcePanel github-sync [options]

Syncronize IcePanel code repos with a GitHub instance

Options:
  --api-url <value>         IcePanel API URL (default: "https://api.icepanel.io/v1")
  -k, --api-key <value>     IcePanel API key
  -s, --url <value>         GitHub URL (default: "https://api.github.com")
  -t, --token <value>       GitHub token
  -i, --interval <secs>     Interval for syncronization (default: "1800")
  -f, --force               Force refresh of code repos and trees
  --filter-repos <pattern>  Filter code repo names to include, supports wildcards
  --delete-all              Delete all code repos and trees for this integration
  --concurrency <value>     Number of jobs that can be processed in parallel (default: "10")
  -h, --help                display help for command

Environment variables:
  API_URL             IcePanel API URL
  API_KEY             IcePanel API key
  GITHUB_URL          GitHub URL
  GITHUB_TOKEN        GitHub token
  SYNC_INTERVAL       Interval for syncronization
  FORCE               Force refresh of code repos and trees
  FILTER_REPOS        Filter code repo names to include, supports wildcards
  CONCURRENCY         Number of jobs that can be processed in parallel
  LOG_LEVEL           Options are fatal, error, warn, info, debug, trace, silent

Self-signed certificates

To use a self signed the certificates NODE_TLS_REJECT_UNAUTHORIZED=0must be specified as an environment variable to the CLI container.

Last updated