{"record":{"id":"e2938e625e342500","repo":"hashicorp/vagrant","slug":"the-box-you-re-attempting-to-add-has-no-available","errorCode":null,"errorMessage":"The box you're attempting to add has no available version that\nmatches the constraints you requested with support for the\nrequired provider and architecture. Versions of the box that\nsupport the required provider and architecture are listed\nbelow.\n\nBox: %{name}\nAddress: %{url}\nConstraints: %{constraints}\nArchitecture: %{architecture}\nProvider: %{provider}\nSupported versions: %{versions}","messagePattern":"The box you're attempting to add has no available version that\nmatches the constraints you requested with support for the\nrequired provider and architecture\\. Versions of the box that\nsupport the required provider and architecture are listed\nbelow\\.\n\nBox: %(.+?)\nAddress: %(.+?)\nConstraints: %(.+?)\nArchitecture: %(.+?)\nProvider: %(.+?)\nSupported versions: %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::BoxAddNoMatchingProviderVersion","httpStatus":null,"severity":"warning","filePath":"lib/vagrant/action/builtin/box_add.rb","lineNumber":309,"sourceCode":"\n                # If no providers are found, then the box does not\n                # have any support for the requested architecture\n                if supported_providers.empty?\n                  raise Errors::BoxAddNoArchitectureSupport,\n                    architecture: display_architecture,\n                    name: metadata.name,\n                    url: display_url\n                end\n\n                raise Errors::BoxAddNoMatchingArchitecture,\n                  provider: Array(provider).join(\", \"),\n                  architecture: display_architecture,\n                  name: metadata.name,\n                  url: display_url,\n                  supported_providers: supported_providers\n              end\n\n              raise Errors::BoxAddNoMatchingProviderVersion,\n                constraints: version || \">= 0\",\n                provider: Array(provider).join(\", \"),\n                architecture: display_architecture,\n                name: metadata.name,\n                url: display_url,\n                versions: available_versions.reverse.join(\", \")\n            else\n              # Report that no version can match the constraints requested\n              # but show what versions are supported\n              raise Errors::BoxAddNoMatchingVersion,\n                constraints: version || \">= 0\",\n                name: metadata.name,\n                url: display_url,\n                versions: metadata.versions(architecture: architecture).reverse.join(\", \")\n            end\n          end\n\n          metadata_provider = nil","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/action/builtin/box_add.rb#L291-L327","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Leave key insertion enabled (the default): `config.ssh.insert_key = true` so Vagrant generates and installs a private key for the machine.","Or provide a key explicitly: `config.ssh.private_key_path = \"~/.ssh/id_ed25519\"` (forward_agent alternatives aside, rsync needs a real IdentityFile).","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.","Inspect what the machine actually reports: `vagrant ssh-config` and check for an IdentityFile line."],"exampleFix":"# Vagrantfile — before (password-only auth; rsync prompts)\nconfig.ssh.insert_key = false\nconfig.ssh.password  = \"vagrant\"\n\n# after (key-based auth; rsync runs unattended)\nconfig.ssh.insert_key = true\n# config.ssh.password no longer needed","handlingStrategy":"validation","validationCode":"# Key-based auth must be in place before rsync runs unattended\nvagrant ssh-config | grep -q IdentityFile \\\n  || echo \"password-only SSH: rsync will prompt for the password\"","typeGuard":"def key_based_ssh?(ssh_info)\n  !ssh_info[:private_key_path].nil? && !ssh_info[:private_key_path].empty?\nend","tryCatchPattern":null,"preventionTips":["Keep `config.ssh.insert_key` at its default (true) so Vagrant provisions a key the rsync subprocess can use.","In CI, always assert `vagrant ssh-config` yields an IdentityFile before any rsync-dependent step.","Avoid `config.ssh.password`-only setups when rsync synced folders are in play — rsync cannot feed the prompt."],"tags":["rsync","vagrant","ssh","authentication","synced-folders"],"backgroundTag":"ssh-password-auth","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}