code-server icon indicating copy to clipboard operation
code-server copied to clipboard

[Bug]: Docker Compose HASHED_PASSWORD

Open groot314 opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: iPad Chrome
  • Local OS: Ubuntu
  • Remote OS: iPad
  • Remote Architecture: amd64
  • code-server --version: latest

Steps to Reproduce

  1. Setup with docker-compose
  2. Create Argon Hash with desired password
  3. Past the hash into the docker compose file environment variable “HASHED_PASSWORD”
  4. Check if you can login using password

Expected

You should be able to login with the password that was hashed

Actual

Returns “incorrect password”

Logs

No response

Screenshot/Video

B748BC46-C35E-4E72-9544-B23EE6F99B0B

Does this issue happen in VS Code or GitHub Codespaces?

  • [X] I cannot reproduce this in VS Code.
  • [X] I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • [X] I am using HTTPS.

Notes

No response

groot314 avatar Jul 10 '22 00:07 groot314

Inside the container, if you echo HASHED_PASSWORD, what do you see? I'm wondering if it needs to be in quotes.

jsjoeio avatar Jul 18 '22 22:07 jsjoeio

The issue is caused by the $ signs inside the string.

In order to make this work in your Docker Compose file, you need to change all the single $ to $$.

Cyborgmatt avatar Aug 08 '22 13:08 Cyborgmatt

Ah got it. Cool, I'm going to close this for now.

jsjoeio avatar Aug 08 '22 22:08 jsjoeio