-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Bridge credentials should be read from the full configuration chain #406
Comments
So git-bug read the git config with git itself, through the Bridges configurations are stored in the local git config ( Based on this, you should be able to use whatever git foo or files as long as it works for git itself. Isn't that the case ? |
I updated the description and title of this issue for additional clarity. Yes, the configuration for bridges is read from the local configuration, and credentials are read from global. This issue pitches that credentials should be read from the entire chain. |
Also, note that there is a bug with the way credentials are read from the global configuration. If my global configuration contains a block like:
and
|
But why is that the case ? Can you read those with the git config command ? git-bug doesn't do anything special there. |
Yeah, if you have the follow file structure:
then |
instead of explicitly calling |
I don't have time to familiarize myself with the codebase today, but this is a fairly trivial patch (if you approve of it) and I'd be happy to take care of this over the next few days / weekend. |
I'm torn. This looks like a git bug really, because One thing that could be done is to use Some pointers: I want to eventually migrate to using go-git instead of relying on the command line (git-bug would directly interact with the repo instead of running git commands) so this problem might just be irrelevant in the future. |
Also, storing credentials in the git config might just be a bad idea: #327 |
Agreed re: #327 It's not really a bug in
Although, again, I think removing the file specification altogether makes the most sense. |
So just adding |
That would do it, yes, but I'd suggest removing the For writes, writing to the global configuration is probably fine. Better yet, we could allow a flag to choose a particular configuration file for writing (e.g. |
@sudoforge actually this has already been done with #371 but no released version include it yet. That said, I'm looking at migrating to go-git instead of launching CLI commands. One of the limitation is that go-git doesn't support includes. I opened an issue at go-git/go-git#110 |
Closing as it's now outdated. |
git-bug
does not currently read bridge credentials from anything except the user configuration file, e.g.${HOME}/.gitconfig
. It would be awesome if the full configuration chain could be supported, in order of precedence:${REPO_ROOT}/.git/config
${HOME}/.gitconfig
or${XDG_CONFIG_HOME}/git/config
/etc/gitconfig
Additionally, following
include
directives would be useful -- the main application for which is likely keeping the authentication configuration out of the default user-scoped conffile which is stored in a repository for public sharing.The text was updated successfully, but these errors were encountered: