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

Provision git name or email with data from personal access tokens #20938

Closed
Tracked by #20936 ...
skabashnyuk opened this issue Dec 15, 2021 · 3 comments
Closed
Tracked by #20936 ...

Provision git name or email with data from personal access tokens #20938

skabashnyuk opened this issue Dec 15, 2021 · 3 comments
Assignees
Labels
area/che-server area/devworkspace-operator kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@skabashnyuk
Copy link
Contributor

Is your task related to a problem? Please describe

Provide some defaults from git name and email configuration.

Describe the solution you'd like

If no defaults for git name and email configuration is set and if user's namespace contains personal access token of some SCM providers (Github, Bitbucket, Gitlab) we can use PAT to repopulate git configuration.

Describe alternatives you've considered

No response

Additional context

devfile/devworkspace-operator#708

@skabashnyuk skabashnyuk added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Dec 15, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Dec 15, 2021
@benoitf benoitf added area/devworkspace-operator severity/P2 Has a minor but important impact to the usage or development of the system. area/che-server and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Dec 16, 2021
@skabashnyuk
Copy link
Contributor Author

Closing. I think it is better to set up this data explicitly.

@l0rd
Copy link
Contributor

l0rd commented Apr 25, 2022

@skabashnyuk I am no sure why it should be better to set this data explicitly so I am re-opening this issue as I think that this feature adds a lot of value to Che.

@l0rd l0rd reopened this Apr 25, 2022
@vinokurig vinokurig self-assigned this May 5, 2022
@l0rd
Copy link
Contributor

l0rd commented May 11, 2022

A few notes:

  1. the configmap should have the following annotation and labels:
...
metadata:
  annotations:
    controller.devfile.io/mount-as: subpath
    controller.devfile.io/mount-path: /etc/
  labels:
    controller.devfile.io/mount-to-devworkspace: "true"
    controller.devfile.io/watch-configmap: "true"
...
  1. The configmap should have a gitconfig entry in the data section:
...
data:
  gitconfig: ...
  1. ⚠️ If a ConfigMap with those annotations/labels/data.gitconfig exist we should NOT create a new ConfigMap (otherwise the user won't be able to start workspaces).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server area/devworkspace-operator kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

6 participants