gitcred

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gitcred answers Git's credential protocol for the organization's service (spec_053_enterprise EN-61): Git runs the helper with get, store or erase and the request's attributes on stdin (protocol=https, host=…); for get, the helper prints a username and password. Blitz's is the person's access token, which only the Blitz service renews, so the helper asks it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, action string, in io.Reader, out io.Writer, answer Answer) error

Run is the helper: action is get, store or erase. Only get answers; Blitz keeps nothing Git hands it, since the service renews the token.

Types

type Answer

type Answer func(ctx context.Context, protocol, host string) (user, password string, ok bool, err error)

Answer gives the credential for host, asked over protocol (https or http): ok false when there's none (Git then tries its other helpers, or fails), or an error to say why.

type Request

type Request map[string]string

Request is what Git asks for: the attributes it sent.

func Read

func Read(in io.Reader) Request

Read reads Git's attributes, key=value lines up to a blank line or the end.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL