Documentation
¶
Overview ¶
Package gitaddr reads the user part of a git address, so what magpie keeps of one (the library's library.json, the plugin host's plugins.json and bun's package.json) never holds a token typed as its user name (#8178, #8194).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasPassword ¶
HasPassword is whether addr is an http(s) address with a password in its user part (https://me:ghp_…@host/…), which a caller refuses rather than leaves out: one typed with a password was meant to sign in with.
func WithoutUser ¶
WithoutUser is addr without the user part of an http(s) address, the rest as written: https://ghp_…@host/group/repo is https://host/group/repo, git+https://ghp_…@host/x.git#v1 is git+https://host/x.git#v1, and ghp_…@host/group/repo typed without https:// is host/group/repo. A password goes with the user (HasPassword tells a caller that refuses one). git's credential helper signs in without either. An SSH address (ssh://git@…, git@host:path) keeps its user, and anything else is given back as it is.
Types ¶
This section is empty.