hashicorp/vagrant · error · Vagrant::Errors::PushStrategyNotLoaded
There are no push strategies named '%{name}'. Please make su
Error message
There are no push strategies named '%{name}'. Please make sure you
spelled it correctly. If you are using an external push strategy, you
may need to install a plugin. Loaded push strategies are:
%{pushes} What it means
Raised as Vagrant::Errors::PushStrategyNotLoaded from Vagrant::Environment#push (lib/vagrant/environment.rb:706) when the name IS defined in the Vagrantfile's compiled pushes but manager.pushes.get(strategy) returns nil — the push strategy class is not in the plugin registry. I.e. the configuration references a strategy whose implementing plugin is not installed/loaded in this Vagrant.
Source
Thrown at lib/vagrant/environment.rb:706
#
# Precondition: the push is not nil and exists.
def push(name, manager: Vagrant.plugin("2").manager)
@logger.info("Getting push: #{name}")
name = name.to_sym
pushes = self.vagrantfile.config.push.__compiled_pushes
if !pushes.key?(name)
raise Vagrant::Errors::PushStrategyNotDefined,
name: name,
pushes: pushes.keys
end
strategy, config = pushes[name]
push_registry = manager.pushes
klass, _ = push_registry.get(strategy)
if klass.nil?
raise Vagrant::Errors::PushStrategyNotLoaded,
name: strategy,
pushes: push_registry.keys
end
klass.new(self, config).push
end
# The list of pushes defined in this Vagrantfile.
#
# @return [Array<Symbol>]
def pushes
self.vagrantfile.config.push.__compiled_pushes.keys
end
# This returns a machine with the proper provider for this environment.
# The machine named by `name` must be in this environment.
#
# @param [Symbol] name Name of the machine (as configured in theView on GitHub (pinned to 35f3160f4a)
Solutions
- Install the plugin that implements the strategy: `vagrant plugin install <plugin-name>`
- Check the "Loaded push strategies" list in the error to see what is actually available (built-ins include local_exec, ftp, heroku, atlas-style strategies depending on version)
- If the plugin is unavailable, switch the Vagrantfile push to a loaded strategy
- Verify with `vagrant plugin list` and re-run vagrant push
Example fix
# before $ vagrant push release # strategy comes from a third-party push plugin, not installed PushStrategyNotLoaded: ... Loaded push strategies: local_exec, ftp # after $ vagrant plugin install vagrant-<push-plugin> $ vagrant push release
Defensive patterns
Strategy: try-catch
Validate before calling
# Verify the strategy class is registered before pushing
registry = Vagrant.plugin("2").manager.pushes
strategy, _cfg = env.vagrantfile.config.push.__compiled_pushes[name.to_sym]
abort "push plugin for :#{strategy} not loaded" if registry.get(strategy).nil? Try / catch
begin
env.push(name)
rescue Vagrant::Errors::PushStrategyNotLoaded => e
abort "Install the plugin providing push '#{e.extra_data[:name]}'; loaded: #{Array(e.extra_data[:pushes]).join(', ')}"
end Prevention
- Document and script `vagrant plugin install` for every plugin your Vagrantfile pushes rely on
- Prefer built-in strategies (local_exec, ftp) for portable projects
- Run `vagrant plugin list` as a CI preflight when Vagrantfiles use third-party pushes
When it happens
Trigger: A Vagrantfile push block that uses a third-party strategy while the plugin providing it is absent — fresh machine without `vagrant plugin install`, after `vagrant plugin expunge`, or with plugin loading disabled — so the push registry lacks the strategy class even though the config compiles.
Common situations: Onboarding a new machine from a repo whose Vagrantfile pushes depend on a plugin; plugins removed during troubleshooting; version drift where the plugin was renamed and the Vagrantfile still references the old strategy.
Related errors
- The push strategy '%{name}' is not defined in the Vagrantfil
- Vagrant failed to load a configured plugin source. This can
- The capability '%{cap}' could not be found. This is an inter
- The capability '%{cap}' is invalid. This is an internal erro
- The host implementation explicitly specified in your Vagrant
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/1f986794acbb861a.
Report an issue: GitHub.