Skip to content
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

Support user name and email in gitconfig #694

Closed
3 of 5 tasks
Tracked by #20830
metlos opened this issue Dec 2, 2021 · 4 comments
Closed
3 of 5 tasks
Tracked by #20830

Support user name and email in gitconfig #694

metlos opened this issue Dec 2, 2021 · 4 comments
Milestone

Comments

@metlos
Copy link
Contributor

metlos commented Dec 2, 2021

Description

To achieve feature parity with the Che server, DWO should support setting the user name and email in the git config.

For Devworkspace, it seems reasonable to use the same approach as with other parts of the git configuration and have a dedicated label for marking a config map with this information. E.g.

kind: ConfigMap
metadata:
  labels:
    "controller.devfile.io/git-user-config": "true"
    "controllder.devfile.io/watch-configmap": "true"
data:
  name: Will E. Coyote
  email: [email protected]

UPDATE:
This issue has the following subtasks:

@ibuziuk
Copy link
Contributor

ibuziuk commented Dec 6, 2021

@l0rd @metlos the issue has been added to the endgame plan recently. is it expected to be there or could it sleep for the future releases?

@metlos
Copy link
Contributor Author

metlos commented Dec 10, 2021

I'll let @l0rd judge this. I added it to the list just so that it is not forgotten about before we declare feature parity.

@l0rd
Copy link
Collaborator

l0rd commented Dec 13, 2021

We have discussed this issue today. We have identified 2 distinct problems:

  1. Retrieve the user name and email before a workspace is started (from the OIDC provider, git services APIs, asking the user etc...)
  2. Use a ConfigMap to define user git configuration that works for both command line git and editors git UI

If 2 is implemented as in #708 #710 (mounted as /etc/gitconfig in all containers of the workspace pod) then the behavior is correct:

  • If /etc/gitconfig exists, Theia loads values from it at statup time
  • Setting Theia git username and email preferences adds them into ~/.gitconfig in theia-ide container (that have priority over /etc/gitconfig)

For 1. in priority order, che-server/che-operator should try to get username and email:

@l0rd
Copy link
Collaborator

l0rd commented Apr 25, 2022

Closing this issue as we are tracking it in the workspace startup section of eclipse-che/che#20583

@l0rd l0rd closed this as completed Apr 25, 2022
@amisevsk amisevsk added this to the v0.15.x milestone Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants