mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
- `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>
22 lines
492 B
Go
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
|
|
}
|