From 8fb72df400505a654745102f2cf18fe15e64673d Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 30 Sep 2023 01:25:09 +0300 Subject: [PATCH] update Signed-off-by: Vasiliy Tolstov --- cmd/pkgdashcli/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/pkgdashcli/main.go b/cmd/pkgdashcli/main.go index 2f510a0..6062c6d 100644 --- a/cmd/pkgdashcli/main.go +++ b/cmd/pkgdashcli/main.go @@ -14,6 +14,7 @@ import ( "git.unistack.org/unistack-org/pkgdash/internal/modules" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" + httpauth "github.com/go-git/go-git/v5/plumbing/transport/http" yamlcodec "go.unistack.org/micro-codec-yaml/v4" envconfig "go.unistack.org/micro-config-env/v4" fileconfig "go.unistack.org/micro-config-file/v4" @@ -219,7 +220,7 @@ func giteaPullRequest(ctx context.Context, cfg *Config, mods map[string]modules. logger.Fatalf(ctx, "failed to create repo branch: %v", err) } - if err = repo.Push(&git.PushOptions{}); err != nil { + if err = repo.Push(&git.PushOptions{Auth: &httpauth.TokenAuth{Token: envTOKEN}}); err != nil { logger.Fatalf(ctx, "failed to push repo branch: %v", err) }