hashicorp/vagrant · error · VagrantPlugins::CommunicatorWinRM::Errors::AuthenticationFailed

An authorization error occurred while connecting to WinRM.

Error message

An authorization error occurred while connecting to WinRM.

User: %{user}
Endpoint: %{endpoint}
Message: %{message}

What it means

Error "An authorization error occurred while connecting to WinRM. User: %{user} Endpoint: %{endpoint} Message: %{message}" thrown in hashicorp/vagrant.

Source

Thrown at plugins/communicators/winrm/shell.rb:170

        @logger.debug("Output: #{output.inspect}")

        # Verify that we didn't get a parser error, and if so we should
        # set the exit code to 1. Parse errors return exit code 0 so we
        # need to do this.
        if output.exitcode == 0
          if output.stderr.include?("ParserError")
            @logger.warn("Detected ParserError, setting exit code to 1")
            output.exitcode = 1
          end
        end

        return output
      end

      def raise_winrm_exception(exception, shell = nil, command = nil)
        case exception
        when WinRM::WinRMAuthorizationError
          raise Errors::AuthenticationFailed,
              user: @config.username,
              password: @config.password,
              endpoint: endpoint,
              message: exception.message
        when WinRM::WinRMHTTPTransportError
          raise Errors::ExecutionError,
            shell: shell,
            command: command,
            message: exception.message
        when OpenSSL::SSL::SSLError
          raise Errors::SSLError, message: exception.message
        when HTTPClient::TimeoutError
          raise Errors::ConnectionTimeout, message: exception.message
        when IO::TimeoutError
          raise Errors::ConnectionTimeout
        when Errno::ETIMEDOUT
          raise Errors::ConnectionTimeout
          # This is raised if the connection timed out

View on GitHub (pinned to 35f3160f4a)

When it happens

Trigger: Thrown at plugins/communicators/winrm/shell.rb:170 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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