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.

get-credentials: AuthenticationException: Authentication failed.

See original GitHub issue

after successful run of az group deployment create for kubernetes arm from acs-engine, I try

 az acs kubernetes get-credentials --dns-prefix=bits-m --location=westus

and get

ERROR: Authentication failed.
Traceback (most recent call last):
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/main.py", line 34, in main
    cmd_result = APPLICATION.execute(args)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/application.py", line 139, in execute
    result = expanded_arg.func(params)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 275, in _execute_command
    result = op(client, **kwargs) if client else op(**kwargs)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/command_modules/acs/custom.py", line 477, in k8s_get_credentials
    '.kube/config', path_candidate)
  File "/opt/az/local/lib/python2.7/site-packages/azure/cli/command_modules/acs/acs_client.py", line 21, in SecureCopy
    ssh.connect(host, username=user, key_filename=os.path.join(home, '.ssh', 'id_rsa'))
  File "/opt/az/local/lib/python2.7/site-packages/paramiko/client.py", line 380, in connect
    look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host)
  File "/opt/az/local/lib/python2.7/site-packages/paramiko/client.py", line 622, in _auth
    raise saved_exception
AuthenticationException: Authentication failed.
azure-cli (0.1.0b11)

cli version

azure-cli (0.1.0b11)

acr (0.1.0b11)
acs (0.1.0b11)
appservice (0.1.0b11)
cloud (0.1.0b11)
component (0.1.0b11)
configure (0.1.0b11)
container (0.1.0b11)
context (0.1.0b11)
core (0.1.0b11)
feedback (0.1.0b11)
network (0.1.0b11)
nspkg (0.1.0b11)
profile (0.1.0b11)
resource (0.1.0b11)
role (0.1.0b11)
storage (0.1.0b11)
vm (0.1.0b11)

Python (Linux) 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

5reactions
dtzarcommented, Jan 26, 2017

FYI - if you used anything other than /root/.ssh/id_rsa for your SSH key to provision the cluster, then it will not properly authorize to get the credentials. The solution is to add the --ssh-key-file parameter with the path to the SSH key used to provision the cluster. This is enabled in az cli equal or greater to: azure-cli (0.1.1b2+dev) acs (0.1.1b1+dev)

0reactions
gyurobenjamincommented, Apr 27, 2018

cli is ignoring the --ssh-key-file

Read more comments on GitHub >

github_iconTop Results From Across the Web

AuthenticationException throws with correct credentials
It successfully signs up user, but when I'm trying to login it always throws an AuthenticationException on authenticationManager.authenticate( ...
Read more >
UsernamePasswordAuthenticati...
getCredentials () == null) { logger.debug("Authentication failed: no ... request) throws AuthenticationException { UsernamePasswordAuthenticationToken token ...
Read more >
AuthenticationException (Java Platform SE 7 )
This exception is thrown when an authentication error occurs while accessing the naming or directory service. An authentication error can happen, ...
Read more >
Unable to authenticate your credentials error when you ...
Describes an issue that triggers an Unable to authenticate your credentials. Make sure that your user name is in the format @ error....
Read more >
Custom Authentication System with Guard (API Token Example)
In this example, we'll build an API token authentication system, ... it is passed an AuthenticationException that describes how authentication failed via ...
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