che
che copied to clipboard
Consider having more than one git credentials tokens from the same SCM
Is your task related to a problem? Please describe
According to our current logic, we do not propagate more than one scm token with the same scm endpoint and user id: https://github.com/eclipse-che/che-server/blob/4f8a84cb1d4a9a8cd1b698a33457222078114e3c/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java#L107-L108 This might cause a problem when user has an oauth token which might be limited in permissions and a Personal Access Token with full permissions. There is a possibility that the oauth token would be propagated to a workspace but not the PAT, so it might cause problems with some git remote operations due to the oauth token restrictions.
Describe the solution you'd like
Rework the current logic of generating the git-credentials secrets.
Describe alternatives you've considered
No response
Additional context
No response