domino logo
Tech Ecosystem
Get started with Python
Step 0: Orient yourself to DominoStep 1: Create a projectStep 2: Configure your projectStep 3: Start a workspaceStep 4: Get your files and dataStep 5: Develop your modelStep 6: Clean up WorkspacesStep 7: Deploy your model
Get started with R
Step 0: Orient yourself to Domino (R Tutorial)Step 1: Create a projectStep 2: Configure your projectStep 3: Start a workspaceStep 4: Get your files and dataStep 5: Develop your modelStep 6: Clean up WorkspacesStep 7: Deploy your model
Get Started with MATLAB
Step 1: Orient yourself to DominoStep 2: Create a Domino ProjectStep 3: Configure Your Domino ProjectStep 4: Start a MATLAB WorkspaceStep 5: Fetch and Save Your DataStep 6: Develop Your ModelStep 7: Clean Up Your Workspace
Step 8: Deploy Your Model
Scheduled JobsLaunchers
Step 9: Working with Domino Datasets
Domino Reference
Projects
Projects Overview
Revert Projects and Files
Revert a ProjectRevert a File
Projects PortfolioReference ProjectsProject Goals in Domino 4+
Git Integration
Git Repositories in DominoGit-based Projects with CodeSyncWorking from a Commit ID in Git
Jira Integration in DominoUpload Files to Domino using your BrowserFork and Merge ProjectsSearchSharing and CollaborationCommentsDomino Service FilesystemCompare File RevisionsArchive a Project
Advanced Project Settings
Project DependenciesProject TagsRename a ProjectSet up your Project to Ignore FilesUpload files larger than 550MBExporting Files as a Python or R PackageTransfer Project Ownership
Domino Runs
JobsDiagnostic Statistics with dominostats.jsonNotificationsResultsRun Comparison
Advanced Options for Domino Runs
Run StatesDomino Environment VariablesEnvironment Variables for Secure Credential StorageUse Apache Airflow with Domino
Scheduled Jobs
Domino Workspaces
WorkspacesUse Git in Your WorkspaceRecreate A Workspace From A Previous CommitUse Visual Studio Code in Domino WorkspacesPersist RStudio PreferencesAccess Multiple Hosted Applications in one Workspace Session
Spark on Domino
On-Demand Spark
On-Demand Spark OverviewValidated Spark VersionConfigure PrerequisitesWork with your ClusterManage DependenciesWork with Data
External Hadoop and Spark
Hadoop and Spark OverviewConnect to a Cloudera CDH5 cluster from DominoConnect to a Hortonworks cluster from DominoConnect to a MapR cluster from DominoConnect to an Amazon EMR cluster from DominoRun Local Spark on a Domino ExecutorUse PySpark in Jupyter WorkspacesKerberos Authentication
On-Demand Ray
On-Demand Ray OverviewValidated Ray VersionConfigure PrerequisitesWork with your ClusterManage DependenciesWork with Data
On-Demand Dask
On-Demand Dask OverviewValidated Dask VersionConfigure PrerequisitesWork with Your ClusterManage DependenciesWork with Data
Customize the Domino Software Environment
Environment ManagementDomino Standard EnvironmentsInstall Packages and DependenciesAdd Workspace IDEsAdding Jupyter Kernels
Partner Environments for Domino
Use MATLAB as a WorkspaceUse Stata as a WorkspaceUse SAS as a WorkspaceNVIDIA NGC Containers
Advanced Options for Domino Software Environment
Install Custom Packages in Domino with Git IntegrationAdd Custom DNS Servers to Your Domino EnvironmentConfigure a Compute Environment to User Private Cran/Conda/PyPi MirrorsUse TensorBoard in Jupyter Workspaces
Publish your Work
Publish a Model API
Model Publishing OverviewModel Invocation SettingsModel Access and CollaborationModel Deployment ConfigurationPromote Projects to ProductionExport Model Image
Publish a Web Application
App Publishing OverviewGet Started with DashGet Started with ShinyGet Started with FlaskContent Security Policies for Web Apps
Advanced Web Application Settings in Domino
App Scaling and PerformanceHost HTML Pages from DominoHow to Get the Domino Username of an App Viewer
Launchers
Launchers OverviewAdvanced Launcher Editor
Assets Portfolio Overview
Model Monitoring and Remediation
Monitor WorkflowsData Drift and Quality Monitoring
Set up Monitoring for Model APIs
Set up Prediction CaptureSet up Drift DetectionSet up Model Quality MonitoringSet up NotificationsSet Scheduled ChecksSet up Cohort Analysis
Set up Model Monitor
Connect a Data SourceRegister a ModelSet up Drift DetectionSet up Model Quality MonitoringSet up Cohort AnalysisSet up NotificationsSet Scheduled ChecksUnregister a Model
Use Monitoring
Access the Monitor DashboardAnalyze Data DriftAnalyze Model QualityExclude Features from Scheduled Checks
Remediation
Cohort Analysis
Review the Cohort Analysis
Remediate a Model API
Monitor Settings
API TokenHealth DashboardNotification ChannelsTest Defaults
Monitoring Config JSON
Supported Binning Methods
Model Monitoring APIsTroubleshoot the Model Monitor
Connect to your Data
Data in Domino
Datasets OverviewProject FilesDatasets Best Practices
Connect to Data Sources
External Data VolumesDomino Data Sources
Connect to External Data
Connect Domino to DataRobotConnect to Amazon S3 from DominoConnect to BigQuery from DominoConnect to Generic S3 from DominoConnect to IBM DB2 from DominoConnect to IBM Netezza from DominoConnect to Impala from DominoConnect to MSSQL from DominoConnect to MySQL from DominoConnect to Okera from DominoConnect to Oracle Database from DominoConnect to PostgreSQL from DominoConnect to Redshift from DominoConnect to Snowflake from DominoConnect to Teradata from Domino
Work with Data Best Practices
Work with Big Data in DominoWork with Lots of FilesMove Data Over a Network
Advanced User Configuration Settings
User API KeysDomino TokenOrganizations Overview
Use the Domino Command Line Interface (CLI)
Install the Domino Command Line (CLI)Domino CLI ReferenceDownload Files with the CLIForce-Restore a Local ProjectMove a Project Between Domino DeploymentsUse the Domino CLI Behind a Proxy
Browser Support
Get Help with Domino
Additional ResourcesGet Domino VersionContact Domino Technical SupportSupport Bundles
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Domino Reference
>
Projects
>
Git Integration
>
Git Repositories in Domino

Git Repositories in Domino

Domino supports importing Git repositories to projects. Repositories that have been added to a project are available to Runs started in that project, allowing you to access the contents of those repositories just as you would your Domino files. This topic explains how you can import a Git repository to a project, access the added repository from within a Workspace, and commit any changes back to the repository.

Domino supports connecting to Git servers via HTTPS and SSH for both public and private repositories.

Note

Step 1: Create credentials

If you are adding a private repository, want to write commits to remote, or are using SSH, you will need to add Git credentials to your Domino account. Domino will use these credentials to authenticate with the service hosting your repository when you start a Run.

Domino supports storing three types of credentials:

  • Personal Access Tokens

  • SSH private keys

  • Username and password

Option 1: SSH key creation

To connect with SSH, you’ll need a private SSH key that corresponds to a public key that you’ve added to your Git service. Check out the GitHub documentation for thorough instructions on creating and adding keys.

Option 2: Personal Access Token creation

You will need a Personal Access Token to access a private repository via HTTPS. You will need a Personal Access Token if the URI you want to use to interact with a repository is formatted as:

https://<domain>/<user>/<repository>.git

Personal Access Tokens are supported by the following Git services.

GitHub Personal Access Tokens:: The minimum scopes to grant for full functionalities are repo and read:user.

GitLab Personal Access Tokens:: The minimum scopes to grant for full functionalities are read_api' and "write_repo". If you are creating Git-based projects and plan to create repository from inside Domino, you should grant `api access to the Personal Access Token.

To connect to Bitbucket repositories via HTTPS from Domino, you must add a Bitbucket App Password credential to your Domino account.

If your GitHub organization requires SSO then you must authorize the PAT or SSH key in order to access private repositories through Domino.

Read the GitHub documentation for instructions about authorizing keys for SSO on Github.

Option 3: Username and password

For other Git service providers, including Amazon AWS CodeCommit, Azure DevOps, Domino also supports authentication using App username and passwords.

Step 2: Add your credential to Domino

Option 1: SSH private key

You will need an SSH Private Key to access a repository via SSH. You will need an SSH private key if the URI you want to use to interact with a repository is formatted as:

<user>@<domain>:<username>/<repository>.git

SSH access is supported by the following Git services.

  • GitHub SSH Access

  • GitLab SSH Access

  • Bitbucket SSH Access

After setting up SSH access with your Git service, you should have both a public key that you provided to the Git service, and a private key. Use these steps to add the private key to Domino:

  1. Copy your SSH key.

    From a terminal, pbcopy < ~/.ssh/id_rsa is the easiest way to copy the key to your clipboard assuming you set up your key with the standard name and in the standard location.

    If you copy the key manually, remember to include the -----BEGIN OPENSSH PRIVATE KEY----- and -----END OPENSSH PRIVATE KEY----- header and footer.

  2. In the navigation pane, click your username, then click Account Settings.

    Screen Shot 2019 04 30 at 1.13.54 PM

  3. Scroll down to the panel labeled Git Credentials, then click Add a New Credential.

  4. In the Domain field, enter the exact domain of the service hosting your repository, such as github.com , bitbucket.com, or your-internal-gitlab-url.com.

  5. For Authentication Credential Type, click to select Private SSH Key.

  6. Paste your private key. This will be the contents of the private key file that matches the public key you provided to your Git service.

  7. If you set up your SSH keys to require a passphrase when used, enter it in the Passphrase field, then click Add Credential. You should now see your credential listed in the Git Credentials panel. You can also delete it from this panel if desired.

    git credentials panel ssh

Option 2: Personal Access Token

After generating a Personal Access Token in your Git service, use these steps to add it to Domino:

  1. In Domino, click your username, then click Account Settings.

  2. Scroll down to the panel labeled Git Credentials, then click Add a New Credential.

  3. In the Domain field, enter the exact domain of the service hosting your repository, such as github.com, bitbucket.com, or your-internal-gitlab-url.com.

  4. For Authentication Credential Type, click to select Personal Access Token.

  5. Enter your Personal Access Token, then click Add Credential. You should now see your credential listed in the Git Credentials panel. You can also delete it from this panel if desired.

    git credentials panel ssh

Step 3: Add a repository to a project

  1. Open the project you want to add a repository to, then click Files from the navigation bar.

  2. Click to open the Git Repositories tab, then click Add a New Repository.

  3. Enter an optional directory name and the HTTPS or SSH URI of the repository you want to add. The directory name will be the directory in /repos that this repository clones into. It defaults to the name of the repository.

  4. Use the menu to select which branch of the repository you want Domino to check out when it clones this repository into a run or workspace. If you leave this setting at Use default branch, Domino will check out the branch specified as default by your Git service, typically master. You can also specify a different branch name, tag name, commit ID, or supply a custom Git ref.

  5. Click Add Repository.

    add repo modal

Work with a Git repository in Domino

When you start a run or workspace in a project, any repositories added to the project are cloned into /repos and will have the branch or commit you specified checked out.

Remember that your Domino working directory is in /mnt, which is a sibling of /repos. Both directories are in the filesystem root (/). Scripts you have added as Domino files can interact with the contents of these repositories by specifying an absolute path to /repo-name>/<file>.

Commit back to Git Repositories

When you start a Workspace session in a project that has added Git repositories, you will see those repositories listed in the Session Overview under Git repos. If you make changes to the contents of those repositories while running the workspace, those changes will be itemized file-by-file under each repository.

If you want to commit those changes back to the repository, click the checkbox next to the repository name and then click Full Sync.

session overview git repos

You will be prompted to supply a commit message. This commit message will be attached to commits to the selected Git repositories, and to a new revision of the Domino project if there are changes to Domino files. Git commits will be pushed to the default branch you specified when adding the repository.

commit to repos modal

If you attempt to stop your workspace while there are uncommitted changes to your Git repositories, you will be prompted to commit those changes. This works the same as the Session Overview interface. Click the checkbox next to the repositories you want to commit to, supply a commit message, and click Stop and Commit.

stop workspace commit prompt

If you try to commit when there are conflicts between your local changes and the state of the default branch in remote, Domino will create a new branch from its local state. Domino will then push that new branch to remote.

After this happens, you will need to resolve those conflicts outside of Domino, or use the command line in your Workspace session to resolve them. The next time you launch a Workspace session, Domino will check out the default branch from remote, not the new branch it pushed.

Git interaction from the workspace command line

Both Jupyter and RStudio workspaces have command line tools. You can use these to interact with your repositories with conventional Git commands. Go to /repos in your command line to find your project’s repositories. See the official Git documentation to learn more about using Git on the command line.

To open the RStudio command line, click Tools > Shell….

To open the Jupyter command line, from the Files tab click New > Terminal.

open rstudio shell

Track changes to repositories made in Domino Runs

When viewing the Details tab of a Domino Run, at the bottom you will find a Repositories panel. You can expand this panel to see details of how the repository changed during the Run. Domino records the checked out commit at the start of the Run and the end of the Run.

Screen Shot 2019 04 08 at 10.34.35 PM

Troubleshooting

Run Error:

Errors occurred while processing dependencies. Contact support@dominodatalab.com:
Credentials are required for your repository: project-name (ssh://git@github.com/your-org/projectname.git)

Solution:

Your Git Credential added to Domino might have the incorrect Domain. Double-check the domain field in your Git credential to ensure it matches your exact Git repository URL, like:

  • github.com

  • bitbucket.com

  • your-internal-gitlab-url.com

Run Error:

Errors occurred while processing dependencies. Contact support@dominodatalab.com:
Authentication is required for your repository:
The repository provided requires credentials but none were found.
Add SSH or PAT authentication to your Domino account.

Solution:

There are a couple steps to check when encountering this error. First, ensure your private SSH key or PAT has been added to the Git Credentials section of your Domino Account Settings page. Second, if your organization’s Git repository requires SSO access, you may need to authorize the key you have added. See the following instructions about authorizing keys for SSO on Github.

Run Error:

Errors occurred while processing dependencies. Contact support@dominodatalab.com:
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/<your account>/<your repo>/'

Solution:

If your organization’s Git repository requires SSO access, you may need to authorize the key you have added. See the following instructions at authorizing keys for SSO on Github.

Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.