0

I'm trying to deploy using bicep from a Powershell terminal in VSCode behind a corporate proxy.

My command line is:

az deployment sub create -f .\main.bicep -l uksouth

If I'm joined to the VPN then I get the following error:

Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/Azure/bicep/releases/latest (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x04BC0058>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')).

If I drop off the VPN then the error is:

Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/Azure/bicep/releases/latest (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))).

Any help on how to configure VSCode / PowerShell to make this work?

Rob Bowman
  • 7,632
  • 22
  • 93
  • 200
  • is it working from a powershell command outisde of VSCode ? – Thomas Sep 07 '21 at 19:59
  • Same problem – Rob Bowman Sep 07 '21 at 20:00
  • have you tried running `az bicep upgrade` ? – Thomas Sep 07 '21 at 20:06
  • This gives the "(Caused by SSLError(SSLError("bad handshake: Error([('SSL routines" error – Rob Bowman Sep 08 '21 at 06:18
  • Have you tried from another laptop ? I dont have any issue on my side – Thomas Sep 08 '21 at 06:25
  • 1
    Yes, it works fine on my personal laptop. I'm sure it's a problem with the corporate proxy setup but thought it worth checking if anyone else had found a solution to the same problem. – Rob Bowman Sep 08 '21 at 06:29
  • Can you run any other az command like `az webapp list` when you are on connected to VPN ? – Shinva Dec 17 '21 at 06:22
  • One of my clients had a similar issue. In our YAML Pipelines, we exposed a parameter `BicepVersion` with values of `v0.8.9`, `v0.5.6` and `latest`. Then further along in our pipeline at deployment or what-if stage, we ran the following azure-cli - `az bicep install --version $bicepVersion`. We found on our self hotsed agent and proxy, that V0.8.9 worked – Raymondo Feb 23 '23 at 11:28
  • This is caused due to a throttling issue on the github public API. Apparently, it only allows 60 requests per hour from a single IP address. This is very problematic when running builds from shared infrastructure. – Daniel Mackay Mar 03 '23 at 04:52

0 Answers0