azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az login --service-principal --username <> --tenant <> --password <>/service-principal.key errors with below error

Open docunid opened this issue 7 years ago • 1 comments

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az login

Errors:

[('PEM routines', 'PEM_read_bio', 'no start line')]
Traceback (most recent call last):
python3.7/site-packages/knack/cli.py, ln 206, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 603, in execute
    raise ex
cli/core/commands/__init__.py, ln 661, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 654, in _run_job
    six.reraise(*sys.exc_info())
...
azure/cli/core/_profile.py, ln 1020, in __init__
    cert = load_certificate(FILETYPE_PEM, self.cert_file_string)
python3.7/site-packages/OpenSSL/crypto.py, ln 1837, in load_certificate
    _raise_current_error()
python3.7/site-packages/OpenSSL/_util.py, ln 54, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.crypto.Error: [('PEM routines', 'PEM_read_bio', 'no start line')]

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az login --service-principal --username {} --tenant {} --password {}

Expected Behavior

Environment Summary

Darwin-18.7.0-x86_64-i386-64bit
Python 3.7.4
Shell: bash

azure-cli 2.0.71 *

Extensions:
azure-devops 0.12.0

Additional Context

docunid avatar Sep 16 '19 10:09 docunid

Looks similar to https://github.com/Azure/azure-cli/issues/9970. Please let us know if this solves the issue. If not, please provide all commands used. Thanks.

jiasli avatar Sep 17 '19 02:09 jiasli