{"record":{"id":"06d0641ff074a15a","repo":"hashicorp/vagrant","slug":"the-git-binary-bin-could-not-be-found-please","errorCode":null,"errorMessage":"The Git binary '%{bin}' could not be found. Please ensure you\nhave downloaded and installed the latest version of Git:\n\n    https://git-scm.com/downloads","messagePattern":"The Git binary '%(.+?)' could not be found\\. Please ensure you\nhave downloaded and installed the latest version of Git:\n\n    https://git-scm\\.com/downloads","errorType":"exception","errorClass":"VagrantPlugins::HerokuPush::Errors::GitNotFound","httpStatus":null,"severity":"error","filePath":"plugins/pushes/heroku/push.rb","lineNumber":41,"sourceCode":"        branch = git_branch(dir)\n\n        # Get the name of the app\n        app = config.app || interpret_app(dir)\n\n        # Check if we need to add the git remote\n        if !has_git_remote?(config.remote, dir)\n          add_heroku_git_remote(config.remote, app, dir)\n        end\n\n        # Push to Heroku\n        git_push_heroku(config.remote, branch, dir)\n      end\n\n      # Verify that git is installed.\n      # @raise [Errors::GitNotFound]\n      def verify_git_bin!(path)\n        if Vagrant::Util::Which.which(path).nil?\n          raise Errors::GitNotFound, bin: path\n        end\n      end\n\n      # Verify that the given path is a git directory.\n      # @raise [Errors::NotAGitRepo]\n      # @param [String]\n      def verify_git_repo!(path)\n        if !File.directory?(git_dir(path))\n          raise Errors::NotAGitRepo, path: path\n        end\n      end\n\n      # Interpret the name of the Heroku application from the given path.\n      # @param [String] path\n      # @return [String]\n      def interpret_app(path)\n        File.basename(path)\n      end","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/pushes/heroku/push.rb#L23-L59","documentation":"The Heroku push shells out to git for every operation (branch detection, remote management, push). Before anything it calls verify_git_bin!, which runs Vagrant::Util::Which on the configured git path (config.git_bin, default 'git') and raises Errors::GitNotFound when the binary cannot be located. %{bin} is the exact path that failed to resolve.","triggerScenarios":"vagrant push heroku on a host without git installed, git not on the PATH Vagrant inherits, or config.git_bin set to a wrong or non-executable path.","commonSituations":"Minimal CI containers without git; Windows hosts where git is installed but not on PATH for the shell running Vagrant; typos in the push block's git_bin option.","solutions":["Install Git from https://git-scm.com/downloads and confirm `git --version` works in the same shell that runs vagrant","Set an absolute path in the push block: cfg.git_bin = \"C:\\\\Program Files\\\\Git\\\\bin\\\\git.exe\"","Restart the terminal/CI agent after PATH changes so Vagrant sees the updated environment"],"exampleFix":"# before\nconfig.push.define \"heroku\" do |p|\n  p.git_bin = \"git2\"   # typo, not on PATH\nend\n\n# after\nconfig.push.define \"heroku\" do |p|\n  p.git_bin = \"C:\\\\Program Files\\\\Git\\\\bin\\\\git.exe\"\nend","handlingStrategy":"validation","validationCode":"abort \"git not found - install from https://git-scm.com/downloads\" if Vagrant::Util::Which.which(\"git\").nil?","typeGuard":"def git_available?(bin = \"git\")\n  !Vagrant::Util::Which.which(bin).nil?\nend","tryCatchPattern":"begin\n  env.cli(%w(push heroku))\nrescue VagrantPlugins::HerokuPush::Errors::GitNotFound => e\n  abort \"Missing git at '#{e.extra_data[:bin]}' - fix PATH or git_bin\"\nend","preventionTips":["Install git in CI images before any vagrant push step","Set git_bin to an absolute path when the host PATH is unreliable","Restart terminals/agents after PATH edits"],"tags":["heroku","push","git","missing-binary","deploy"],"backgroundTag":"git-not-installed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}