Closed marsteel closed 2 weeks ago
Thanks for reaching out. We've received a few issues in the past involving WSL and SSO. Please refer to the guidance here and here, which recommend setting BROWSER
and that should address the Operation not supported
error. For example:
export BROWSER='/mnt/c/Users/user/AppData/Local/Google/Chrome/Application/chrome'
@tim-finnigan the guidance works. Thanks.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Describe the bug
I use aws-cli v2 in WSL There is trailing semicolon for the login URL when I try to login with aws sso login
Attempting to automatically open the SSO authorization page in your default browser. If the browser does not open or you wish to use a different device to authorize this request, open the following URL:
https://device.sso.us-east-1.amazonaws.com/
Then enter the code:
QCQH-MQWP gio: https://device.sso.us-east-1.amazonaws.com/?user_code=QCQH-MPWP: Operation not supported
The URL is recognized as https://device.sso.us-east-1.amazonaws.com/?user_code=QCQH-MQWP: by Windows Terminal Version: 1.20.11381.0
A web page is opened as https://device.sso.us-east-1.amazonaws.com/?user_code=QCQH-MQWP: The code in the page center is QCQH-MQWP: the authentication will fail
Expected Behavior
Remove the trailing semicolon in the login URL or re-format the output by inserting a space or tab. so the login URL can be correctly recogized by Terminal program.
aws sso login Attempting to automatically open the SSO authorization page in your default browser. If the browser does not open or you wish to use a different device to authorize this request, open the following URL:
https://device.sso.us-east-1.amazonaws.com/
Then enter the code:
QCQH-MQWP gio: https://device.sso.us-east-1.amazonaws.com/?user_code=QCQH-MPWP : Operation not supported
Current Behavior
trailing semicolon for the login URL when aws sso login will be recoginzed as part of login URL and becomes part of the login CODE
Reproduction Steps
run aws-cli v2 in Windows WSL in Windows Terminal to run aws sso login click the URL at the bottom of the output.
Possible Solution
Remove the trailing semicolon in the login URL or re-format the output by inserting a space or tab.
Additional Information/Context
No response
CLI version used
aws-cli/2.16.5 Python/3.11.8 Linux/5.15.146.1-microsoft-standard-WSL2 exe/x86_64.ubuntu.22
Environment details (OS name and version, etc.)
Microsoft Windows [Version 10.0.19045.4412] Linux/5.15.146.1-microsoft-standard-WSL2 exe/x86_64.ubuntu.22