-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Allow specifying a custom gitconfig file #1696
Comments
That should not be the case, ever, if all you use is Git Credential Manager. Granted, other credential helpers sometimes put sensitive information there, but not Git Credential Manager. All that is added to the config is:
Do you consider any of this sensitive information? Having said this, there is already a way to do what you want, but it is admittedly hard to figure out from Git's documentation. The way to do this is to set the environment variable $ GIT_CONFIG_GLOBAL=~/.gitconfig_local git credential-manager configure If you use PowerShell or CMD instead, you will set that environment variable in a different manner, of course, but the principle is the very same. |
@dscho thanks for your reply. What you said is true regarding the first
The thing I treat as "secret" is the value of Anyway, not a big deal and if there is no easy way to achieve that (or if this feature isn't useful to others) we can just close this issue. |
Ah, I can understand that. The code that is responsible for this is here. I am not sure that I can think of an elegant way to accommodate your use case (considering that Maybe there would be a good home for this information in the Windows Credential Store? @mjcheetham what are your thoughts on the matter? |
Of course, GCM shouldn't be responsible for the way I handle my config files. That's well outside the scope of this project IMO. But I thought that given the fact that GCM writes something to a gitconfig file, it would make sense to be able to control which file is being written to. Right now we seem to assume that this file is always at So, I think it's less about my special use case and more about GCM's flexibility (i.e. it's more flexible to be able to control the file path than to have a hardcoded path). I don't have an opinion about Windows Credential Store, but IMO if we try to solve this the solution should be cross platform (I run GCM on Linux in this case for example). |
Feature description
Right now GCM adds a
[credential]
directive to~/.gitconfig
. I'd like to be able to tell GCM which gitconfig file to write the directive to.Rationale: I manage my dotfiles in a Git repo and don't want to commit sensitive info to that repo. Since the
[credential]
directive may sometimes contain sensitive info, I'd like to add it to a separate.gitconfig_local
file which I include from the main file and don't commit to the dotfiles repo.The text was updated successfully, but these errors were encountered: