-
Notifications
You must be signed in to change notification settings - Fork 197
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
az login does not work in codespaces in browser #1006
Comments
I experience this as well, and that's why I assume it prompts the device code route when using |
@zedy-wj have you tried @pamelafox just to clarify,
|
@rajeshkamal5050 Yes, the logic seems to be here to detect codespace and using device code flow: azure-dev/cli/azd/cmd/login.go Line 153 in 75d070a
Here's the relevant issue about |
@rajeshkamal5050 - Yes, as you said, when logging in with @weikanglim , @danieljurek - Do you have any ideas on this issue? |
The issue is that Here's a workaround for how to make it work:
Then go back to the codespaces window and go to the There should be an entry in the port list with the same Note: The codespaces editor creates the
// Or you can also hover over the url and click on the copy button that pops up:
Then click enter. This should redirect the call to the codespaces container and the Then, go back to codespaces and to the // This has nothing to do with |
Note: The previous workaround is also applicable to:
|
@zedy-wj I'm closing this as |
@vhvb1989 - We follow the steps you provided to verify and |
For users running Codespaces in browsers, interactive login does not work due to the localhost server being launched remotely with no forwarding. See #1006. This switches the default login on Codespaces to device-code based which circumvents the need for the login redirect. User can still opt-out of decide-code via `azd login --use-device-code=false`.
Describe the issue:
The command
az login
doesn't work incodespaces
running in VSCode browser.Repro Steps:
<> Code
button and chooseCodespaces
.Create codespace on main
and wait for setting up your codespace to complete.azd
with the commandcurl -fsSL https://aka.ms/install-azd.sh | bash -s -- --version daily
.az login
and enter your account. Display error:This site can't be reached. localhost refused to connect.
Error Message:
Environment:
OS: Codespace.
Templates: All templates
azd version:
azd version 0.3.0-beta.4-daily.1943817 (commit 75d070a7099a1691a96c2ea930b50b6de9fa0c78)
Expected behavior:
az login
can work in codespaces.@weikanglim, @rajeshkamal5050, @danieljurek for notification.
The text was updated successfully, but these errors were encountered: