-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[git] Support authentication on the backend (from the frontend) #1037
Comments
I had the same issue . I adjusted my credential to match the upper / lower case of my credentials. It seems we need to match exactly now. @... |
Worked correctly for me. Could you guys give a pointer what I should do to be able to reproduce this? |
Did you log out first? https://stackoverflow.com/questions/28238037/git-log-out-user-from-command-line |
No, but what would you expect? I mean, of course, a nice pop-up dialog should be raised just like in VSCode where the user can authenticate, but in our case the Git executable could be on another machine. I would say it is not a bug but a missing feature? What do you think, @akosyakov? |
As a workaround: one can do that in a terminal. |
Proposal: One unix-user per frontend user This is an example that should show the basic ideas:
Preconditions for that this work with Theia:
Example:
|
Alternatively, here is a complete guide to support multiple GitHub accounts with a single Theia backend. It was tested and verified on Windows. It requires having Discard the current state (if any)Unsets the credential helper, so Git forgets about any previously authenticated users.
Verify, it is unset. The following command must not print anything to the terminal.
Unsets any configured username/email pairs.
Verify the username and the email. The following command must not print anything to the terminal.
Creating a new SSH key per user for GitHub
Use When prompted for the passphrase, you are free to pick anything. If you specify the password, you have to give it each time when executing for instance Add your SSH-key to the SSH agent. We are still in
If you have given a passphrase, you will be asked for that. Configuring the SSH key per user on GitHubCopy the public key from the
Go to GitHub, and add your SSH key: Configure the backend to use the SSH keysCreate a file named
Clone with SSH keyOnce the Theia backend is running, open a new workspace for the user. Clone the repository in the following way.
Or
Configure user and email per repositoryNavigate into the new local Git clone inside the Theia workspace and set the username and the email for Git.
If you have configured a passphrase for your SSH keys, you have to push from a Theia terminal with Adding multiple usersOne has to repeat the steps from above per GitHub accounts. |
@tsmaeder Can we close this? If so, please do |
We can close this one: our own git Theia extension is deprecated for the VS Code built-in extension. The SCM api does not deal with authentication at all, so as long as we correctly handle secret storage and authentication sessions, we should have everything VS Code has. |
When I try to push changes to GitHub via the UI, I get prompted for my account credentials in a terminal running the backend.
The text was updated successfully, but these errors were encountered: