Azure / Azure/azure-cli

az login: Failed to establish a new connection: [Errno -2] Name does not resolve

Open
#21,247 17 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
customer-reported feature-request WSL
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug
When logging in with azure cli inside of mcr.microsoft.com/azure-cli:2.32.0 container I get an error (See below), The same login command works if I login outside of the container on my host.

**Command Name**
`az login`

**Errors:**
```
: Failed to establish a new connection: [Errno -2] Name does not resolve

```

## 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 -u {} -p {} --tenant {}`

## Expected Behavior
Should have successfully signed in.

## Environment Summary
```
Linux-5.4.0-99-generic-x86_64-with, Alpine Linux v3.14
Python 3.9.6
Installer: DOCKER

azure-cli 2.32.0 *
```
## Additional Context
Running inside a mcr.microsoft.com/azure-cli:2.32.0 container

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.