Incorrect password, local config.yaml not used
See original GitHub issueOS/Web Information
- Web Browser: Chrome
- Local OS: Windows / MacOS
- Remote OS: Ubuntu
- Remote Architecture: amd64
code-server --version
: 3.10.1
Steps to Reproduce
- Create a config.yaml and fill in the fields like this
bind-addr: 0.0.0.0:8080
auth: password
hashed-password: xxxx
cert: false
The hashed password was generated with printf "thisismypassword" | sha256sum | cut -d' ' -f1
2. Setup Nginx proxy conf file, and launch with docker compose
code-server:
image: codercom/code-server:latest
container_name: "code-server"
hostname: "code-server"
restart: unless-stopped
user: root
environment:
- DOCKER_USER=${USER}
expose:
- "8080"
volumes:
- ${WORK_DIR}:/home/coder/project
- ${HOME}/.vscode:/home/coder/.local/share/code-server
- ${HOME}/.config/code-server:/home/coder/.config/code-server
- Go to my browser and type in the password, but always receive a “Incorrect password” error.
- I checked the config file
~/.config/code-server/config.yaml
inside the container and it was the same as the local one.
Expected
Login page leads to coder workspace upon entering the password specified in local config.yaml
Actual
Login page shows “Incorrect password”. Container logs output “Failed login attempt”.
Logs
This were the logs from the container
[2021-05-20T14:20:59.093Z] info Wrote default config file to ~/.config/code-server/config.yaml
[2021-05-20T14:20:59.548Z] info code-server 3.10.1 421237f499079cf88d68c02163b70e2b476bbb0d
[2021-05-20T14:20:59.549Z] info Using user-data-dir ~/.local/share/code-server
[2021-05-20T14:20:59.570Z] info Using config file ~/.config/code-server/config.yaml
[2021-05-20T14:20:59.570Z] info HTTP server listening on http://0.0.0.0:8080
[2021-05-20T14:20:59.570Z] info - Authentication is enabled
[2021-05-20T14:20:59.570Z] info - Using password from ~/.config/code-server/config.yaml
[2021-05-20T14:20:59.571Z] info - Not serving HTTPS
Failed login attempt {"xForwardedFor":"x.x.x.x","remoteAddress":"x.x.x.x","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36","timestamp":1621520562}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
npm install gives unauthorized name or password is incorrect ...
I had auth credentials in my .npmrc file which weren't registered with the public registry. If you have other config pairs in that...
Read more >Configuring a registry - Docker Documentation
Configuring a registry. The Registry configuration is based on a YAML file, detailed below. While it comes with sane default values out of...
Read more >Configure the EB CLI - AWS Elastic Beanstalk
If no profiles are found, or a profile is found but does not have permission to use Elastic Beanstalk, the EB CLI prompts...
Read more >Introduction to YAML Configurations - CircleCI
Steps are a list of commands to run inside the Docker container. # CircleCI configuration file version: 2.1 jobs: build: docker: - image:...
Read more >Config file processing in Spring Boot 2.4
security.user.password: usera --- spring.profiles: local ... When using spring.config.import: vault://, application no more writes ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the quick reply. Since the environment variable
$HASHED_PASSWORD
always takes precedence I finally managed to login that way. Not sure if it was caused by some of sort cache by container volumes.All right now that I have the right directory it works for me. I generated my password the same way. Nothing looks out of place to me.
Does the login page say that the password is from the config file?