hashicorp/vagrant · warning · Vagrant::Errors::BoxAddNoMatchingProviderVersion

The box you're attempting to add has no available version th

Error message

The box you're attempting to add has no available version that
matches the constraints you requested with support for the
required provider and architecture. Versions of the box that
support the required provider and architecture are listed
below.

Box: %{name}
Address: %{url}
Constraints: %{constraints}
Architecture: %{architecture}
Provider: %{provider}
Supported versions: %{versions}

What it means

In RsyncSyncedFolder#enable (synced_folder.rb:43-49), after ensuring rsync exists in the guest, Vagrant fetches machine.ssh_info and, when `ssh_info[:private_key_path]` is empty while `ssh_info[:password]` is set, warns that the machine uses password-based authentication, that rsync cannot be scripted to enter that password, and that you will likely be prompted; the locale text points at `config.ssh.insert_key` as the remedy. Each rsync_single call for every synced folder inherits this, so you can be prompted repeatedly.

Source

Thrown at lib/vagrant/action/builtin/box_add.rb:309

                # If no providers are found, then the box does not
                # have any support for the requested architecture
                if supported_providers.empty?
                  raise Errors::BoxAddNoArchitectureSupport,
                    architecture: display_architecture,
                    name: metadata.name,
                    url: display_url
                end

                raise Errors::BoxAddNoMatchingArchitecture,
                  provider: Array(provider).join(", "),
                  architecture: display_architecture,
                  name: metadata.name,
                  url: display_url,
                  supported_providers: supported_providers
              end

              raise Errors::BoxAddNoMatchingProviderVersion,
                constraints: version || ">= 0",
                provider: Array(provider).join(", "),
                architecture: display_architecture,
                name: metadata.name,
                url: display_url,
                versions: available_versions.reverse.join(", ")
            else
              # Report that no version can match the constraints requested
              # but show what versions are supported
              raise Errors::BoxAddNoMatchingVersion,
                constraints: version || ">= 0",
                name: metadata.name,
                url: display_url,
                versions: metadata.versions(architecture: architecture).reverse.join(", ")
            end
          end

          metadata_provider = nil

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Leave key insertion enabled (the default): `config.ssh.insert_key = true` so Vagrant generates and installs a private key for the machine.
  2. Or provide a key explicitly: `config.ssh.private_key_path = "~/.ssh/id_ed25519"` (forward_agent alternatives aside, rsync needs a real IdentityFile).
  3. If password auth is required, expect to type the password when prompted during `vagrant up`/`vagrant rsync`, or pre-seed the password via sshpass-style wrappers outside Vagrant.
  4. Inspect what the machine actually reports: `vagrant ssh-config` and check for an IdentityFile line.

Example fix

# Vagrantfile — before (password-only auth; rsync prompts)
config.ssh.insert_key = false
config.ssh.password  = "vagrant"

# after (key-based auth; rsync runs unattended)
config.ssh.insert_key = true
# config.ssh.password no longer needed
Defensive patterns

Strategy: validation

Validate before calling

# Key-based auth must be in place before rsync runs unattended
vagrant ssh-config | grep -q IdentityFile \
  || echo "password-only SSH: rsync will prompt for the password"

Type guard

def key_based_ssh?(ssh_info)
  !ssh_info[:private_key_path].nil? && !ssh_info[:private_key_path].empty?
end

Prevention

When it happens

Trigger: An rsync-backed synced folder on a machine whose ssh_info carries no private key path but does carry a password — typically `config.ssh.insert_key = false` with the box's password auth, a provider that only returns password credentials, or a manually specified `config.ssh.password` without any private_key_path.

Common situations: Users disabling automatic key insertion (config.ssh.insert_key = false) for parity with older Vagrant behavior; Windows/OpenSSH guests or providers exposing password-only ssh_info; CI environments where an interactive password prompt hangs rsync.

Related errors


AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21). Data as JSON: /api/errors/e2938e625e342500. Report an issue: GitHub.