question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CLI Authentication fails

See original GitHub issue

I am logged in through the CLI, but I am receiving the error below in dbt debug

profiles.yml:

default:
  target: dev
  outputs:
    dev:
      type: sqlserver
      driver: 'ODBC Driver 17 for SQL Server'
      encrypt: true
      trust_cert: false
      authentication: cli
      server: "{{ env_var('HOSTNAME') }}"
      port: 1433
      database: "{{ env_var('DATABASE') }}"
      schema: "{{ env_var('SCHEMA') }}"

dbt debug:

Running with dbt=0.19.0
dbt version: 0.19.0
python version: 3.8.7
python path: /usr/local/bin/python
os info: Linux-4.19.121-linuxkit-x86_64-with-glibc2.2.5
Using profiles.yml file at /dbt/config/profiles.yml
Using dbt_project.yml file at /dbt/projects/default/dbt_project.yml

Configuration:
  profiles.yml file [OK found and valid]
  dbt_project.yml file [OK found and valid]

Required dependencies:
 - git [OK found]

Connection:
  database: <private>
  schema: <private>
  port: 1433
  UID: None
  client_id: None
  authentication: cli
  encrypt: True
  trust_cert: False
  Connection test: ERROR

dbt was unable to connect to the specified database.
The database returned the following error:

  >Database Error
  ('28000', "[28000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ''. (18456) (SQLDriverConnect)")

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
sdebruyncommented, Feb 4, 2021

Spot on. Using CLI works like a charm.

1reaction
sdebruyncommented, Feb 4, 2021

Azure CLI auth itself does not seem to be the problem, I tried AzureCliCredential().get_token in a script myself and that worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Error: Authentication Failed from the Command Line
Command line authentication requires a personal access token. Go to Settings: Then Developer Settings:.
Read more >
Git push results in "Authentication Failed" - Stack Overflow
Go to Control Panel > User Accounts > Credential Manager > Windows Credentials. You will see Git credentials in the list (e.g. git:https://)....
Read more >
gcloud CLI authentication failed
Error : The authentication flow did not complete successfully. To get valid credentials, please re-run: gcloud auth login.
Read more >
Solved: CLI "login failed" error on DS - Splunk Community
It's asking for the Splunk admin account password that you would have created when installing Splunk. You can reset it via the web...
Read more >
Failed CLI login due to Password with a Special Character
To resolve this issue, when using the CLI enter the password double quotation marks; for example, "password". Connection to the server will be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found