Git

Synchronize configuration files with git.

Download this Lecture Docs

In this lecture, we go through how to configure git sync for PowerShell Universal. We'll setup a GitHub repository and generate a personal access token to push and pull from our repository. We will then switch to one-way git sync mode to set PowerShell Universal into read-only operation.

One-Way Git Sync Example

  "Data": {
    "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
    "ConnectionString": "filename=%ProgramData%\\UniversalAutomation\\database.db;upgrade=true",
    "GitRemote": "https://github.com/ironmansoftware/scaling-octo-lamp.git",
    "GitUserName": "adamdriscoll",
    "GitPassword": "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",
    "GitBranch": "main",
    "GitSyncBehavior": "OneWay",
    "GitInitializeBehavior": "clone",
    "ConfigurationScript": ""
  },

Two-Way Git Sync Example

  "Data": {
    "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
    "ConnectionString": "filename=%ProgramData%\\UniversalAutomation\\database.db;upgrade=true",
    "GitRemote": "https://github.com/ironmansoftware/scaling-octo-lamp.git",
    "GitUserName": "adamdriscoll",
    "GitPassword": "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",
    "GitBranch": "main",
    "GitSyncBehavior": "TwoWay",
    "GitInitializeBehavior": "init",
    "ConfigurationScript": ""
  },