auth

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 2 Imported by: 3

Documentation

Overview

Package auth maps forge credentials to safe Git HTTPS configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitConfigArgs

func GitConfigArgs(cred Credential) []string

GitConfigArgs returns git -c http.extraHeader=... args. Empty token yields nil.

func InferSCM

func InferSCM(remoteURL string) string

InferSCM guesses the forge from an HTTPS remote URL host.

func RedactToken

func RedactToken(token string) string

RedactToken returns a safe placeholder when token is non-empty.

Types

type Credential

type Credential struct {
	Token string
	SCM   string // github, gitlab, bitbucket, or empty for GitHub-style default
}

Credential is a forge-scoped HTTPS token for Git smart HTTP.

Jump to

Keyboard shortcuts

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