Connecting to Git Repositories

Starting erwin Data Modeler (DM) 12.0, you can connect erwin DM to Git repositories via Mart Server. This enables you to push Forward Engineering (FE) scripts for a Mart Model to GitLab or GitHub. You cannot store FE scripts or DDL on a Mart Server but only erwin models. With Git support you can adopt DevOps principles as you can commit FE scripts in Git repositories. Working with these repositories help you in:

  • DevOps adoption
  • collaboration with team members
  • version control
  • workflow management
  • data integrity

Pushing FE scripts to a Git repository involves:

  1. Connecting erwin DM to Mart Server
  2. Connecting erwin DM to a Git repository
  3. Opening a Mart Model and committing FE scripts

To summarize, following is the workflow to commit FE scripts.

Connecting erwin DM to Git Repositories

A Git repository may be hosted on GitLab or GitHub. For a successful connection to these repositories, following are the prerequisites:

  • erwin Mart: Ensure that,
    • erwin DM is connected to erwin Mart Server. For more information on connecting erwin DM to Mart Server, refer to the Connect to Mart topic.
    • the DM Connect for Git permission is enabled for your Mart user profile at the root, Mart level. By default, this permission is enabled for the out-of-box Admin profile.
    • This permission is not available for other out-of-box profiles.

  • Personal Access Token: Ensure that you have created the required personal access token. To know how to create personal access tokens for GitLab, refer to the GitLab documentation. To know how to create personal access tokens for GitHub, refer to the GitHub documentation.

Once, these prerequisites are in place, to connect Git repositories to erwin DM, follow these steps:

  1. On the ribbon, click Mart.
  2. Click Git Connections.
  3. The Git Connection Manager page appears.

  4. Enter appropriate values in the fields. Refer to the following table for field descriptions.
  5. Field Name Description Additional Information
    Connection Name Specifies a user defined connection name

    For example, ConnectGit.

    You can create multiple connections one for each Git repository.

    Git Hosting Service Specifies the Git hosting service to which erwin DM connects

    GitLab: Indicates that erwin DM connects to GitLab

    GitHub: Indicates that erwin DM connects to GitHub

    User Name Specifies the username to log on to the Git hosting service This field is not mandatory.
    Password Specifies the password to log on to the Git hosting service This field is not mandatory.
    Personal Access Token Specifies the personal access token to connect to the Git hosting service  
    Git Repository Specifies the URL of a Git repository where you want to push the forward engineering script

    For example, https://gitlab.com/d4215/GitLabIntegration or

    https://github.com/poly-inc/poly-main-MCL

    Git Branch Specifies the branch that is used to push the forward engineering script For example, main.
  6. Click Save.
  7. On successful connection, the connection name appears under Recent Connections.

Troubleshooting

While setting up your connection, you may encounter the following error:

To resolve this error, follow these steps:

  1. On your system, go to Control Panel > Internet Options > Advance Tab.
  2. Clear the Warn if changing between secure and not secure mode check box.
  3. Click OK.
  4. Close and reopen erwin DM.
  5. Connect erwin DM to Mart Server.
  6. Launch the Git Connection Manager page and configure the Git connection.

Once you are connected to a Git repository, you can commit FE scripts.