az artifacts universal download not working behind proxy
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
I am working behind a corporate proxy. I am using below enviroment variables. http_proxy: username:passoword@proxy.com:1234 https_proxy: username:passoword@proxy.com:1234 az login works fine. But the below command fails
Command Name
az artifacts universal download Extension Name: azure-devops. Version: 0.15.0.
Errors:
HTTPSConnectionPool(host='08wvsblobprodsu6weus73.vsblob.vsassets.io', port=443): Max retries exceeded with url: /artifacttool/artifacttool-win10-x64-Release_0.2.128.zip?sv=2017-04-17&sr=b&sig=ROwJZvi91FUWlgxNKLvGhncGvNt4pMAscin24AU8TpA%3D&spr=https&se=2019-11-19T12%3A28%3A02Z&sp=r&P1=1574166182&P2=11&P3=2&P4=nVC9zR0DzXvi2mMg1dV0dLTFHj9003iy92tc2KVTAk0%3d (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',)))
Traceback (most recent call last):
pip-install-hb486cm7\urllib3\urllib3\connectionpool.py, ln 594, in urlopen
pip-install-hb486cm7\urllib3\urllib3\connectionpool.py, ln 805, in _prepare_proxy
pip-install-hb486cm7\urllib3\urllib3\connection.py, ln 308, in connect
...
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 artifacts universal download --organization {} --feed {} --name {} --version {} --path {}
Expected Behavior
Environment Summary
Windows-10-10.0.18362-SP0
Python 3.6.6
Shell: powershell.exe
azure-cli 2.0.76
Extensions:
azure-devops 0.15.0
Additional Context
Issue Analytics
- State:
- Created 4 years ago
- Comments:15
Top Results From Across the Web
'az artifacts universal download' command gets stuck on ...
Hey all,. need help with setting up 'az'. Basically everything is working what I have tried so far except 'az artifacts universal download' ......
Read more >ArtifactTool.exe unable to download package from universal ...
The release pipeline fails on step Download artifact - _externalFiles (Azure ... There is no proxy configured on the OS level, nor on...
Read more >Azure Devops - Universal Download SSL Error - ADocLib
The release pipeline fails on step Download artifact - _externalFiles (Azure Artifacts): There is no proxy configured on the OS level, nor on...
Read more >Working with Azure CLI behind SSL intercepting proxy server
This might be due to your ssl intercepting corporate proxy server. The proxy server might be using unsigned certificates or more likely it...
Read more >Download Artifact Fails ignoring http_proxy - Stack Overflow
UPDATE: Setting Environment=https_proxy=http://proxy.ourlandomain.com:3333 in the systemd config for the agent solves the problem and the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @muru03
A variety of things can be happening during this call so I would like to ask you to go through several steps to help us determine the root of the problem.
1) Use ArtifactTool directly Please follow the following link after filling out the org name and the os-name (os name should be windows or linux): https://vsblob.dev.azure.com/<organization-name>_apis/clienttools/artifacttool/release?osName=<OS-name>&arch=x86_64 . From this request, you will receive a Json structure resembling this:
{ “name”: “artifacttool”, “rid”: “win10-x64”, “version”: “0.2.104”, “uri”: “https://03nvsblobprodwcus014.vsblob.vsassets.io/artifacttool/…” }
Please download ArtifactTool from the returned URI and extract the tool from the zip onto your machine. ArtifactTool currently only supports PAT authentication. Documentation for how to generate a PAT can be find here: https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page . The PAT scope should contain Packaging permissions (read permissions needed for download, read&write needed for download and publish). The PAT will need to be passed as an environment variable. You will need to pass the environment variable name to a --patvar parameter. The rest of the parameters should be familiar and can be found in the Connect to Feed dialogue.
Ex: $env:ArtifactToolPat=“<pat-goes-here>” .\artifacttool.exe universal download --service <service url> --patvar ArtifactToolPat --feed <feedName> --package-name <packageName> --package-version <version> --path <path to download to> .\artifacttool.exe universal publish --service <service url> --patvar ArtifactToolPat --feed <feedName> --package-name <packageName> --package-version <version> --path <path to file to publish>
If this works, this means that you can access and use ArtifactTool correctly and it isn’t a permissions/local configurations issue. This can be used as a workaround if the following steps don’t work while we continue to investigate.
2) Use the CLI but have the CLI run a local version of the ArtifactTool You will need to set an environment variable leading to the folder containing the ArtifactTool you downloaded in the previous step. The path should be to the folder containing the executable.
Ex. $env:AZURE_DEVOPS_EXT_ARTIFACTTOOL_OVERRIDE_PATH= “<path>\artifacttool\ArtifactTool_win10-x64_0.2.128”
You should be able to use the CLI normally now, the only difference is that it will not attempt to auto update to a newer version of ArtifactTool. Please make sure to have --debug enabled.
3) Use the CLI with automatic download
Remove the environment variable from the previous step and use normal CLI command.
Please let me know which step starts causing errors; any logs you get would be appreciated.
Closing as original issues are resolved. @eosfor please open a new issue with your questions.