Skip to content

[Bug]: code-sever in docker not remember github auth #6568

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

Closed
4 tasks done
code1704 opened this issue Dec 5, 2023 · 4 comments
Closed
4 tasks done

[Bug]: code-sever in docker not remember github auth #6568

code1704 opened this issue Dec 5, 2023 · 4 comments
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@code1704
Copy link

code1704 commented Dec 5, 2023

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser:
  • Local OS:
  • Remote OS:
  • Remote Architecture:
  • code-server --version:

Steps to Reproduce

  1. run code server docker image
  2. code server web and login github (copilot)
  3. restart code server container and it asks to github copilot login again

Expected

remember my github auth for copilot

Actual

no

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

No response

@code1704 code1704 added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Dec 5, 2023
@code-asher
Copy link
Member

Are you mounting your data directory (~./local/share/code-server by default)? If the contents are not being persisted between Docker restarts then code-server will be unable to access the previous auth token.

@code1704
Copy link
Author

code1704 commented Dec 6, 2023

Are you mounting your data directory (~./local/share/code-server by default)? If the contents are not being persisted between Docker restarts then code-server will be unable to access the previous auth token.

Yes, we mount the home dir (~). But it still requires github login each time. Which file stores the github auth?

@code-asher
Copy link
Member

The actual GitHub auth token is stored in browser storage, but it is encrypted and half of the key is in ~/.local/share/code-server/serve-web-key-half. The other half of the key is also in browser storage, I believe.

So as long as the server key half is the same and the browser is the same the login should persist.

Also, what version of code-server are you running? Persistent secret storage was broken before 4.17.1.

@bdsoha
Copy link
Contributor

bdsoha commented Jan 1, 2024

@code1704 I think this can be closed, this is the same as #5072

@code1704 code1704 closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants