Skip to content

SSPI Provider: No credentials were supplied - Cannot generate SSPI context on Mac with Docker #335

@Matias311

Description

@Matias311

Hi, I’m trying to connect to SQL Server using vim-dadbod-ui on my MacBook, but I’m getting the following error:

SSPI Provider: No credentials were supplied, or the credentials were unavailable or inaccessible.
Cannot generate SSPI context.

config:

return {
  "kristijanhusak/vim-dadbod-ui",
  dependencies = {
    { "tpope/vim-dadbod", lazy = true },
    { "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true }, -- Optional
  },
  cmd = {
    "DBUI",
    "DBUIToggle",
    "DBUIAddConnection",
    "DBUIFindBuffer",
  },
  init = function()
    vim.g.db_ui_use_nerd_fonts = 1
    vim.g.dbs = {
      { name = "sql-server", url = "sqlserver://user:password@localhost:1433/master" },
    }
  end,
}

What I’ve tried:

  • I can connect to the container using sqlcmd from the terminal without issues But vim-dadbod-ui always throws the SSPI error.
  • lua{ name = "sql-server", url = "sqlserver://user:password@localhost:1433/master?integratedSecurity=false" }
  • lua{ name = "sql-server", url = "sqlserver://user:password@localhost:1433/master?integratedSecurity=false&encrypt=false&trustServerCertificate=true" }

Has anyone experienced this when connecting to SQL Server from macOS/Docker using vim-dadbod-ui?
Do I need to set additional parameters (like disabling SSPI / forcing SQL authentication) in the connection string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions