Git Repository Integration

Overview

HPE Morpheus Software integrates with Git repositories (both self-hosted and cloud-hosted) to provide version-controlled source management for automation scripts, Terraform configurations, ARM templates, Kubernetes specs, and application deployment code.

Git integrations are configured in Provisioning > Code > Integrations (Provisioning > Code > Integrations) and enable HPE Morpheus Software to pull Task scripts, Spec Templates, and other configuration content directly from repositories.

Adding a Git Integration

To add a generic Git repository integration:

  1. Navigate to Provisioning > Code > Integrations

  2. Click + ADD

  3. Select Git Repository as the integration type

  4. Complete the configuration:

    • NAME: Descriptive name for the integration

    • ENABLED: Toggle to enable/disable

    • REPOSITORY URL: The Git clone URL (HTTPS or SSH)

      • HTTPS: https://git.example.com/org/repo.git

      • SSH: git@git.example.com:org/repo.git

    • DEFAULT BRANCH: The default branch to use (e.g., main, master)

    • AUTHENTICATION:

      • Username/Password: For HTTPS repositories with basic auth

      • Access Token: For HTTPS with token-based authentication

      • SSH Key: Select a key pair from Infrastructure > Trust > Key Pairs for SSH access

      • Credential: Select a stored credential set

  5. Click SAVE

HPE Morpheus Software validates connectivity and clones the repository metadata.

Repository Browsing

Once integrated, repository contents can be browsed directly in HPE Morpheus Software:

  1. Navigate to Provisioning > Code > Repositories (Provisioning > Code > Repositories)

  2. Select the repository

  3. Browse the file tree, switch branches, and view file contents

Note

File browsing requires the Provisioning: Code Repositories role permission set to “Read” or “Full”.

Using Git Repositories with Tasks

Tasks can source their scripts from Git repositories:

  1. When creating or editing a Task, set SOURCE to “Repository”

  2. Select the Git integration from the REPOSITORY dropdown

  3. Specify the file path in WORKING PATH (e.g., scripts/deploy.sh)

  4. Optionally specify a BRANCH/TAG (defaults to the integration’s default branch)

    • To reference a specific tag: refs/tags/v1.0.0

    • To reference a branch: feature/my-branch

Each time the Task executes, HPE Morpheus Software pulls the latest version from the repository, ensuring scripts stay current without manual updates.

Using Git Repositories with Spec Templates

Spec Templates (Library > Templates > Spec Templates) can be sourced from Git:

  1. Set the source type to “Repository”

  2. Select the repository and specify the file path

  3. The template content is pulled from Git at execution time

Using Git Repositories with Blueprints

Terraform, ARM, CloudFormation, and Kubernetes blueprints can reference Git repositories for their configuration files. The Git integration provides:

  • Version-controlled infrastructure-as-code

  • Branch-based environment separation (dev, staging, production)

  • Pull request workflows for infrastructure changes

Repository Synchronization

HPE Morpheus Software synchronizes repository metadata periodically:

  • File tree structure is cached for browsing performance

  • Branch and tag lists are refreshed on sync

  • Manual refresh can be triggered from the repository detail page

To force a refresh:

  1. Navigate to Provisioning > Code > Repositories

  2. Select the repository

  3. Click REFRESH from the Actions menu

Authentication Methods

Method

Use Case

Username/Password

Basic HTTPS authentication

Personal Access Token

GitHub, GitLab, Bitbucket HTTPS access

SSH Key Pair

SSH-based Git access

Stored Credential

Reusable credential from Trust section

Removing a Git Integration

  1. Navigate to Provisioning > Code > Integrations

  2. Click the trash icon on the integration row

  3. Confirm deletion

Warning

Removing a Git integration will break any Tasks, Spec Templates, or Blueprints that reference it. Update those resources to use a different source before removal.