-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Feature]: Sign commit using GPG when possible #2
Comments
|
It seems that the go-git is unable to load the local git client settings. |
Any updates on this? Looks like it grabs the contents of the gpg key so I'm not sure how you'd go about providing that configurability in this repo. Methods to retrieve from local config: |
I tested this and it still doesn't work using The following however does work: gitConfig, err := config.LoadConfig(config.GlobalScope)
log.Info(gitConfig.Raw.Sections.GoString())
userSection := gitConfig.Raw.Section("user")
log.Info(userSection)
log.Info(userSection.Options.Get("signingkey"))
commitSection := gitConfig.Raw.Section("commit")
log.Info(commitSection)
log.Info(commitSection.Options.Get("gpgsign")) So it seems like the best way to handle this is falling back to There is a relevant issue open about this but it seems to be stale: |
In case the user has configured to use a GPG key to sign a commit, version-bump should use that key to sign the commit it creates as well.
The text was updated successfully, but these errors were encountered: