Skip to content

Commit d40c87c

Browse files
authored
fix: username is required, but ignored for GitHub's https push (#1784)
1 parent c6de72b commit d40c87c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/gitrepo/gitrepo.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ func (r *LocalRepository) Push(branchName string) error {
405405
if r.gitPassword != "" {
406406
slog.Info("Authenticating with basic auth")
407407
auth = &httpAuth.BasicAuth{
408+
// GitHub authentication needs the username set to a non-empty value, but
409+
// it does not need to match the token
410+
Username: "cloud-sdk-librarian",
408411
Password: r.gitPassword,
409412
}
410413
}

0 commit comments

Comments
 (0)