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.

Can't connect to HTTPS URL because the SSL module is not available.

See original GitHub issue

Description

build a docker image with the azure-cli using apt-get

when run az login got this:

root@c66f71:/go# az login
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /common/oauth2/devicecode?api-version=1.0 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",))

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: apt-get

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here:

root@c61850366f71:/go# az --version
azure-cli (2.0.16)

acr (2.0.11)
acs (2.0.14)
appservice (0.1.15)
batch (3.1.2)
billing (0.1.4)
cdn (0.0.7)
cloud (2.0.7)
cognitiveservices (0.1.7)
command-modules-nspkg (2.0.1)
component (2.0.7)
configure (2.0.10)
consumption (0.1.4)
container (0.1.9)
core (2.0.15)
cosmosdb (0.1.12)
dla (0.0.11)
dls (0.0.13)
eventgrid (0.1.3)
feedback (2.0.6)
find (0.2.6)
interactive (0.3.9)
iot (0.1.11)
keyvault (2.0.9)
lab (0.0.10)
monitor (0.0.9)
network (2.0.13)
nspkg (3.0.1)
profile (2.0.11)
rdbms (0.0.6)
redis (0.2.8)
resource (2.0.13)
role (2.0.11)
servicefabric (0.0.3)
sf (1.0.8)
sql (2.0.10)
storage (2.0.14)
vm (2.0.13)

Python (Linux) 3.6.1 (default, Aug 31 2017, 21:03:43)
[GCC 4.8.4]

Python location '/opt/az/bin/python3'

Legal docs and information: aka.ms/AzureCliLegal

OS Version: What OS and version are you using?
Answer here: docker base image: golang:1.8.3-stretch

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: bash

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brharrcommented, Dec 20, 2017

So I am getting this error with absolute latest cli install and python install on one of the newest macs with the latest MacOS.

"Can’t Connect to HTTPS URL because the SSL module is not available. "

These installs are fresh.

BTW, the install docs for Mac needs to be updated to include the need for python3 as that is not installed with the MacOS and python3 needs the xcode command line tools or it will not link properly.

1reaction
patoncrispycommented, Sep 27, 2017

I’m having this issue using GitLab CI. Docker image is microsoft/dotnet:2.0.0-sdk. The steps that cause this failure are:

    - apt-get update
    - apt-get install apt-transport-https
    - echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | tee /etc/apt/sources.list.d/azure-cli.list
    - apt-key adv --keyserver packages.microsoft.com --recv-keys 417A0893
    - apt-get update
    - apt-get install azure-cli
    - az login --service-principal -u "$AZURE_SERVICE_PRINCIPAL_NAME" -p $AZURE_SERVICE_PRINCIPAL_PASSWORD --tenant "$AZURE_SERVICE_PRINCIPAL_TENANT" 
Read more comments on GitHub >

github_iconTop Results From Across the Web

Requests (Caused by SSLError("Can't connect to HTTPS URL ...
Requests module works fine when I use in Spyder IDE but when I try to execute the script in windows it fails with...
Read more >
Python "SSLError("Can't connect to HTTPS URL because the ...
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Read more >
How to fix "Can't connect to HTTPS URL because the SSL ...
How to fix “Can't connect to HTTPS URL because the SSL module is not available” with a python installation in pyenv on Ubuntu?...
Read more >
Can't connect to HTTPS URL because the SSL module is not ...
Start Anaconda Prompt conda search conda gives an error message: Can't connect to HTTPS URL because the SSL module is not available ......
Read more >
SSLError("Can't connect to HTTPS URL because the SSL ...
I get SSL error. I'm able to manually run those same functions from the python virtual environment and everything works perfect. Seems like...
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