You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatically authenticate user with Coder in a workspace #2840
Hi, it seems that I am impacted by similar issue, though maybe the observed behavior is slightly different.
I have freshly installed coder (same version as in title) with docker on a Ubuntu 20.04 machine with nginx as reverse proxy.
I'm using docker and docker with code-server templates for testing.
I cannot open terminal to the workspace via any means provided by coder known to me (web interface, code-server, coder ssh command). They all give me empty terminal. In the web interface I saw in the network inspector that the web socket connection is working and the terminal is sending my keystrokes - it's just the other side that is silent.
When I open docker shell into the workspace and try to run any eg. coder list I'm getting error that I'm not logged in.
Export gives me that:
docker logs gives me a ton of error messages like this:
2022-07-09 20:44:43.309 [WARN] <./agent/agent.go:137> (*agent).run failed to dial {"error": "GET https://<redacted domain name>/api/v2/workspaceagents/me/metadata: unexpected status code 401: Cookie \"session_token\" must be provided.: Try logging in using 'coder login \u003curl\u003e'."}
It might be that my proxy configuration is wrong, though I do not see any errors that would indicate that. I'm using the following nginx config:
I also tried the trick with setting Connection header depending on $http_upgrade value, but that did not help in any way, so I reverted to simpler option.
Oh and the web interface says that the agent is connected.
If what I'm experiencing is unrelated, but still qualifies as a proper ticket please let me know and I'll create a new one.
changed the title [-]CLI in workspace requires running `coder login`[/-][+]Automatically authenticate user with Coder in a workspace[/+]on Aug 24, 2022
This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.
Activity
ketang commentedon Jul 6, 2022
Hmm... I just tried to replicate this on our internal instance and was unable to.
Do you have these environment variables set?
enbyted commentedon Jul 9, 2022
Hi, it seems that I am impacted by similar issue, though maybe the observed behavior is slightly different.
I have freshly installed coder (same version as in title) with docker on a Ubuntu 20.04 machine with nginx as reverse proxy.
I'm using docker and docker with code-server templates for testing.
I cannot open terminal to the workspace via any means provided by coder known to me (web interface, code-server,
coder sshcommand). They all give me empty terminal. In the web interface I saw in the network inspector that the web socket connection is working and the terminal is sending my keystrokes - it's just the other side that is silent.When I open docker shell into the workspace and try to run any eg.
coder listI'm getting error that I'm not logged in.Export gives me that:
docker logsgives me a ton of error messages like this:It might be that my proxy configuration is wrong, though I do not see any errors that would indicate that. I'm using the following nginx config:
I also tried the trick with setting Connection header depending on $http_upgrade value, but that did not help in any way, so I reverted to simpler option.
Oh and the web interface says that the agent is connected.
If what I'm experiencing is unrelated, but still qualifies as a proper ticket please let me know and I'll create a new one.
[-]Bug in v0.7.6 a494489: `coder` CLI in workspace requires `login`[/-][+]CLI in workspace requires `login`[/+][-]CLI in workspace requires `login`[/-][+]CLI in workspace requires running `coder login`[/+]misskniss commentedon Jul 26, 2022
@bpmct will you add your repro steps?
misskniss commentedon Jul 26, 2022
?Is CODER_USER token set?
bpmct commentedon Jul 26, 2022
Done in issue comment
misskniss commentedon Jul 26, 2022
@enbyted Would you mind creating a separate issue for what you are seeing so we can take a look? We think yours is potentially an nginx error.
[-]CLI in workspace requires running `coder login`[/-][+]Automatically authenticate user with Coder in a workspace[/+]github-actions commentedon Oct 25, 2022
This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.
matifali commentedon Nov 16, 2023
We now have this using the coder-login module.