-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Provide git credential storage mechanism #17251
Comments
The problem here is how to set the
|
Some thoughts: #13611 |
also if we have #14217, we could reuse the token as the password ... for GH at least. |
Yes it seems we didn't have much choice - mount whole |
We could also alias or wrap the git command so it does what we want in our container at least |
But finally i think it would be good to let the user store with credential storage from git and keep that in a secret. (1. from Mario) https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage |
we could patch, in the containers where we would use git, |
Please treat this as a highly important P1 for the current 7.17 sprint, per Parag's comments on https://issues.redhat.com/browse/CRW-1025?focusedCommentId=14177136&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14177136 |
on it. |
What if we add new annotation
@l0rd @mshaposhnik @sunix wdyt? |
i am ok with dedicated annotation |
FYI
|
so if we are building
(the result of the |
I think we could patch |
@sunix yes that's what I meant in my comment above. Currently, when I start a workspace in Che, there are some git config that are already injected:
In addition to |
Is your enhancement related to a problem? Please describe.
When using git with HTTPS protocol all the connection needs a username and password. To avoid prompting for credential at every connection git allows to configure a credential storage mechanism:
cache with timeout
$ git config --global credential.helper 'cache --timeout=3600'
local file with cleartext username/password (never expires)
git config --global credential.helper 'store --file ~/.git-store/credentials'
This is described here.
That can be done manually on che workspaces but requires a manual step (
git config
command) that needs to be repeated at every restart of the workspace.Describe the solution you'd like
We should document how to use the secret injection mechanism to inject a file with the username and password and set the git config
credential.helper
accordingly:And in the git configuration:
The text was updated successfully, but these errors were encountered: