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

Git user email and name not configured. #13880

Closed
1 of 3 tasks
sunix opened this issue Jul 17, 2019 · 1 comment
Closed
1 of 3 tasks

Git user email and name not configured. #13880

sunix opened this issue Jul 17, 2019 · 1 comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template.

Comments

@sunix
Copy link
Contributor

sunix commented Jul 17, 2019

Describe the bug

When the user is performing a git commit through a terminal on a container or through the vscode extension, email and name are not configured.
At the moment, the user has to run these commands on the right git containers each time a new workspace is started.

git config --global user.name "John Doe" && git config --global user.email "john.doe@acme.com"

Few ideas for fixing it:

  1. Retrieve defaults one from the che user api.
  2. Store name/email in preferences.
  3. Execute the previous commands on each containers (hard to predict where git is available or not, commands may fail)
  4. Add these env variables on each containers (don't need git to be present, won't crash) https://git-scm.com/book/pl/v2/Git-Internals-Environment-Variables

    GIT_AUTHOR_NAME is the human-readable name in the “author” field.
    GIT_AUTHOR_EMAIL is the email for the “author” field.
    GIT_COMMITTER_NAME sets the human name for the “committer” field.
    GIT_COMMITTER_EMAIL is the email address for the “committer” field.

  5. Use EMAIL env variable

    EMAIL is the fallback email address in case the user.email configuration value isn’t set. If this isn’t set, Git falls back to the system user and host names.

  6. Store/mount ~/.gitconfig in preferences (but where to mount them ? as $HOME maybe different is moving from one container to another)

Che version

  • latest
  • nightly
  • other: please specify
@sunix sunix added area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. labels Jul 17, 2019
@slemeur
Copy link
Contributor

slemeur commented Jul 17, 2019

Closing this issue in favor of #13874.
(Content of this issue merged with #13874)

@slemeur slemeur closed this as completed Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants