diff options
Diffstat (limited to 'services/asymkey/sign.go')
-rw-r--r-- | services/asymkey/sign.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/asymkey/sign.go b/services/asymkey/sign.go index 59f96352de..c3f093a808 100644 --- a/services/asymkey/sign.go +++ b/services/asymkey/sign.go @@ -90,15 +90,15 @@ func SigningKey(ctx context.Context, repoPath string) (string, *git.Signature) { if setting.Repository.Signing.SigningKey == "default" || setting.Repository.Signing.SigningKey == "" { // Can ignore the error here as it means that commit.gpgsign is not set - value, _ := git.NewCommand(ctx, "config", "--get", "commit.gpgsign").RunInDir(repoPath) + value, _, _ := git.NewCommand(ctx, "config", "--get", "commit.gpgsign").RunStdString(&git.RunOpts{Dir: repoPath}) sign, valid := git.ParseBool(strings.TrimSpace(value)) if !sign || !valid { return "", nil } - signingKey, _ := git.NewCommand(ctx, "config", "--get", "user.signingkey").RunInDir(repoPath) - signingName, _ := git.NewCommand(ctx, "config", "--get", "user.name").RunInDir(repoPath) - signingEmail, _ := git.NewCommand(ctx, "config", "--get", "user.email").RunInDir(repoPath) + signingKey, _, _ := git.NewCommand(ctx, "config", "--get", "user.signingkey").RunStdString(&git.RunOpts{Dir: repoPath}) + signingName, _, _ := git.NewCommand(ctx, "config", "--get", "user.name").RunStdString(&git.RunOpts{Dir: repoPath}) + signingEmail, _, _ := git.NewCommand(ctx, "config", "--get", "user.email").RunStdString(&git.RunOpts{Dir: repoPath}) return strings.TrimSpace(signingKey), &git.Signature{ Name: strings.TrimSpace(signingName), Email: strings.TrimSpace(signingEmail), |