Files
Tea-Cli/internal/auth/httpsign_agent_windows.go
T
bircni 88b91faa54 refactor: add credential and Git packages (#1123)
- `internal/auth`: credentials in the OS keyring or a private file, OAuth login with token refresh, SSH HTTP-signature signers (key files with passphrase prompt, ssh-agent keys and certificates), and the Git credential helper protocol.
- `internal/git`: cancellable Git subprocesses, repository and remote discovery (tracked remote via `branch.<name>.remote`), PR checkout by full ref, AGit push, branch cleanup.

Nothing imports these packages yet.

Reviewed-on: https://gitea.com/gitea/tea/pulls/1123
Reviewed-by: TheFox0x7 <95654+thefox0x7@noreply.gitea.com>
2026-10-11 17:09:37 +00:00

22 lines
492 B
Go

// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
//go:build windows
package auth
import (
"errors"
"github.com/davidmz/go-pageant"
"golang.org/x/crypto/ssh/agent"
)
// getAgent returns the Pageant client, which holds no connection for release to close.
func getAgent() (client agent.Agent, release func(), err error) {
if !pageant.Available() {
return nil, nil, errors.New("no pageant available")
}
return pageant.New(), func() {}, nil
}