Documentation
¶
Overview ¶
Package gitbroker lets git in the VM fetch from and push to the remotes the project config names, with the git login of the host, so that the VM never holds the login. It speaks the smart HTTP protocol of git and checks each request against the rules of its remote: fetch or not, and the branches a push may update.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Remote ¶
type Remote struct {
Name string
// Fetch allows clone and fetch.
Fetch bool
// Push are the branches a push may create or update, as patterns of
// path.Match, such as aibox/*. Empty refuses every push.
Push []string
// Login is what the broker sends upstream for this remote over HTTPS.
Login Login
// SSH, when set, is the login the broker uses instead, over SSH.
SSH *SSH
}
Remote is a repository the VM may use, named as host/path without a scheme and without .git, such as github.com/owner/repo.
type SSH ¶
type SSH struct {
// Address is the host and port to dial.
Address string
// User is who the broker logs in as, git for most hosts.
User string
// Signers are the keys the broker offers.
Signers []ssh.Signer
// HostKey checks the key of the server against the known hosts of the
// host.
HostKey ssh.HostKeyCallback
// HostKeyAlgorithms are those of the keys the known hosts hold for the
// server, which the broker asks the server for.
HostKeyAlgorithms []string
}
SSH is the SSH login of the host for a remote. The broker then speaks SSH to the server and HTTP to git in the VM.
Click to show internal directories.
Click to hide internal directories.