Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't add ssh extension to az #30517

Open
achampav opened this issue Dec 13, 2024 · 11 comments
Open

I can't add ssh extension to az #30517

achampav opened this issue Dec 13, 2024 · 11 comments
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@achampav
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

I can't add ssh extension to az

Command Name
az extension add

Errors:

An error occurred. Pip failed with status code 3221225477. Use --debug for more information.

To Reproduce:

az extension add --name ssh

  • Put any pre-requisite steps here... None
  • az extension add --name {}

Expected Behavior

ssh extension to az installed

Environment Summary

Windows-11-10.0.26100-SP0
Python 3.12.7
Installer: MSI

azure-cli 2.67.0

Additional Context

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 13, 2024

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Dec 13, 2024
Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.

@achampav
Copy link
Author

It has not helped me.
Same error message

@yonzhan yonzhan added the Service Attention This issue is responsible by Azure service team. label Dec 14, 2024
@bebound
Copy link
Contributor

bebound commented Dec 16, 2024

I can't repro.
What's the output of this command?

cd 'C:\Program Files\Microsoft SDKs\Azure\CLI2'  
./python.exe -m pip install https://azcliprod.blob.core.windows.net/cli-extensions/ssh-2.0.6-py3-none-any.whl --target $env:USERPROFILE\.azure\cliextensions\ssh

@sschmeck
Copy link

I have the same issue with several extensions (e.g. application-insights). While az extension add --name ssh fails, running the logged Python command succeeds. Afterwards, the extension is also visible via az extension list.

I can't repro. What's the output of this command?

cd 'C:\Program Files\Microsoft SDKs\Azure\CLI2'  
./python.exe -m pip install https://azcliprod.blob.core.windows.net/cli-extensions/ssh-2.0.6-py3-none-any.whl --target $env:USERPROFILE\.azure\cliextensions\ssh

It works for me.

Installing collected packages: rpds-py, attrs, referencing, urllib3, jsonschema-specifications, idna, charset-normalizer, certifi, requests, pywin32, jsonschema, oschmod, oras, ssh
Successfully installed attrs-24.3.0 certifi-2024.12.14 charset-normalizer-3.4.0 idna-3.10 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 oras-0.1.30 oschmod-0.3.12 pywin32-308 referencing-0.35.1 requests-2.32.3 rpds-py-0.22.3 ssh-2.0.6 urllib3-2.2.3
WARNING: You are using pip version 21.2.4; however, version 24.3.1 is available.
You should consider upgrading via the '[..]\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.

@achampav
Copy link
Author

No output:
PS C:\Program Files\Microsoft SDKs\Azure\CLI2> ./python.exe -m pip install https://azcliprod.blob.core.windows.net/cli-extensions/ssh-2.0.6-py3-none-any.whl --target $env:USERPROFILE.azure\cliextensions\ssh
PS C:\Program Files\Microsoft SDKs\Azure\CLI2>

@krzysztofraczka
Copy link

krzysztofraczka commented Dec 17, 2024

I have similar problem after running above there is no output and I can see ssh installed after trying to install using
az extension add --name sshI'm geting

cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 3221225477. Use --debug for more information.

my versions:
pip 24.3.1
Python 3.12.0

@bebound
Copy link
Contributor

bebound commented Dec 18, 2024

cd 'C:\Program Files\Microsoft SDKs\Azure\CLI2'  
./python.exe -m pip install https://azcliprod.blob.core.windows.net/cli-extensions/ssh-2.0.6-py3-none-any.whl --target $env:USERPROFILE\.azure\cliextensions\ssh

This command does the same thing as az extension add -n ssh. Pip failed with status code 3221225477 does not provide any useful information, and this command should output more details.
@achampav @krzysztofraczka It should have some output. I notice that the \ before .azure is missing.

I assume one of the dependencies of ssh fails to build like Azure/azure-cli-extensions#8264

@sschmeck
Copy link

I have the same issue with several extensions (e.g. application-insights). While az extension add --name ssh fails, running the logged Python command succeeds. Afterwards, the extension is also visible via az extension list.

I can't repro. What's the output of this command?

cd 'C:\Program Files\Microsoft SDKs\Azure\CLI2'  
./python.exe -m pip install https://azcliprod.blob.core.windows.net/cli-extensions/ssh-2.0.6-py3-none-any.whl --target $env:USERPROFILE\.azure\cliextensions\ssh

It works for me.

Installing collected packages: rpds-py, attrs, referencing, urllib3, jsonschema-specifications, idna, charset-normalizer, certifi, requests, pywin32, jsonschema, oschmod, oras, ssh
Successfully installed attrs-24.3.0 certifi-2024.12.14 charset-normalizer-3.4.0 idna-3.10 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 oras-0.1.30 oschmod-0.3.12 pywin32-308 referencing-0.35.1 requests-2.32.3 rpds-py-0.22.3 ssh-2.0.6 urllib3-2.2.3
WARNING: You are using pip version 21.2.4; however, version 24.3.1 is available.
You should consider upgrading via the '[..]\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.

I was wrong, since I had another Python interpreter as part of the PATH variable and forgot the leading .\. When using the interpreter installed by Azure CLI, I see no additional output. Also with -v, I see no error.

.\python.exe -v -m pip install `
  --target $env:USERPROFILE\.azure\cliextensions\ssh `
  https://azcliprod.blob.core.windows.net/cli-extensions/ssh-2.0.6-py3-none-any.whl `
  ; echo $LASTEXITCODE
[..]
# extension module '_ctypes' executed from '[..]\\AppData\\Local\\Programs\\Python\\Python312\\DLLs\\_ctypes.pyd'
import '_ctypes' # <_frozen_importlib_external.ExtensionFileLoader object at 0x000000000456DD00>
-1073741819

@achampav
Copy link
Author

I have the same issue with several extensions (e.g. application-insights). While az extension add --name ssh fails, running the logged Python command succeeds. Afterwards, the extension is also visible via az extension list.

I can't repro. What's the output of this command?

cd 'C:\Program Files\Microsoft SDKs\Azure\CLI2'  
./python.exe -m pip install https://azcliprod.blob.core.windows.net/cli-extensions/ssh-2.0.6-py3-none-any.whl --target $env:USERPROFILE\.azure\cliextensions\ssh

It works for me.

Installing collected packages: rpds-py, attrs, referencing, urllib3, jsonschema-specifications, idna, charset-normalizer, certifi, requests, pywin32, jsonschema, oschmod, oras, ssh
Successfully installed attrs-24.3.0 certifi-2024.12.14 charset-normalizer-3.4.0 idna-3.10 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 oras-0.1.30 oschmod-0.3.12 pywin32-308 referencing-0.35.1 requests-2.32.3 rpds-py-0.22.3 ssh-2.0.6 urllib3-2.2.3
WARNING: You are using pip version 21.2.4; however, version 24.3.1 is available.
You should consider upgrading via the '[..]\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.

I was wrong, since I had another Python interpreter as part of the PATH variable and forgot the leading .\. When using the interpreter installed by Azure CLI, I see no additional output. Also with -v, I see no error.

.\python.exe -v -m pip install `
  --target $env:USERPROFILE\.azure\cliextensions\ssh `
  https://azcliprod.blob.core.windows.net/cli-extensions/ssh-2.0.6-py3-none-any.whl `
  ; echo $LASTEXITCODE
[..]
# extension module '_ctypes' executed from '[..]\\AppData\\Local\\Programs\\Python\\Python312\\DLLs\\_ctypes.pyd'
import '_ctypes' # <_frozen_importlib_external.ExtensionFileLoader object at 0x000000000456DD00>
-1073741819

It doesn't install ssh extension for me. After doing that and calling "az ssh vm", I've the same message:
The command requires the extension ssh. It will be installed first.

@0x326
Copy link

0x326 commented Jan 2, 2025

See #30594 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

6 participants