For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect Your Repository

Connect your Git repository to enable version-controlled ML experiments. Valohai will fetch your code at the start of each execution and automatically track which commit was used.

Before You Start

Make sure you have:

  • A Valohai project (create one from the dashboard)

  • A Git repository with your ML code

  • (For private repos) SSH access configured

Connect a Public Repository

Public repositories are the fastest way to get started—no authentication needed.

Navigate to your project settings:

  1. Open your Valohai project

  2. Go to SettingsRepository

  3. Enter your repository URL in HTTPS format:

    https://github.com/username/repository.git
  4. Click Save

Valohai will fetch your repository immediately. You'll see the available commits in the execution creation dialog.

Connect a Private Repository

Private repositories require SSH authentication. Valohai uses deploy keys for secure, read-only access.

Generate SSH Key in Valohai

The easiest method is to let Valohai generate the key pair:

  1. Go to SettingsRepository

  2. Click Generate SSH Key

  3. Download or copy both keys:

    • Public key (.pub) – Add this to your Git provider

    • Private key (.pem) – Paste this into Valohai

Add Public Key to Your Git Provider

The exact steps depend on your provider:

Add Private Key to Valohai

Back in Valohai's repository settings:

  1. Enter your SSH repository URL:

  2. Paste the entire private key into the SSH private key field

  3. The key should start with -----BEGIN RSA PRIVATE KEY-----

  4. Click Save

Valohai will attempt to fetch the repository. If successful, you'll see your commits.

Repository URL Formats

Use the correct URL format for your connection type:

Public HTTPS repositories:

Private SSH repositories:

Private HTTPS with credentials (not recommended):

💡 Use SSH for private repos. Embedding credentials in URLs is less secure and harder to manage.

Select branches

Using the Branch input field, select the branches you would like to track in Valohai. This setting requires a comma-separated list of branch names or patterns.

Selected branch patterns are compared against the existing branches using Shell Patterns.

With each Fetch repository action, Valohai will fetch the latest commit from each of the selected branches.

💡 To fetch tags, add tag/ prefix to your tag name, and as such add it to the Branch input field.

Verify the Connection

After connecting, verify everything works:

  1. Go to ExecutionsCreate Execution

  2. Check the Commit dropdown—you should see your commits listed

  3. If commits are missing, click Fetch Repository in settings

💡 If you just connected the repository, no commits will appear in Valohai until you fetch it once.

Fetch New Commits

Valohai caches your repository state. After pushing new commits, manually fetch to update:

  1. Go to SettingsRepository

  2. Click Fetch Repository

  3. New commits appear immediately in execution dialogs

Automate fetching with webhooks:

Troubleshooting

"Repository not found" or "Permission denied"

  • Double-check the repository URL format

  • Ensure the SSH public key is added to your Git provider

  • Verify the private key was pasted completely (including header/footer)

"Fetch timeout" or "Slow fetches"

  • Your repository may be too large (>100 MB compressed)

  • Use .vhignore to exclude unnecessary files

  • Consider using Git submodules for large dependencies

"Old code is running"

  • You need to fetch after pushing new commits

  • Click Fetch Repository in project settings

  • Consider setting up webhooks for automatic fetching

"Can't see my private key field"

  • Make sure you're using the SSH URL format (git@...)

  • The private key field only appears for SSH URLs

Next Steps

Configure your repository:

Advanced workflows:

Last updated

Was this helpful?