import "github.com/go-git/go-git/plumbing/transport/http"
Package http implements the HTTP transport protocol.
common.go receive_pack.go upload_pack.go
DefaultClient is the default HTTP client, which uses `http.DefaultClient`.
NewClient creates a new client with a custom net/http client. See `InstallProtocol` to install and override default http client. Unless a properly initialized client is given, it will fall back into `http.DefaultClient`.
Note that for HTTP client cannot distinguish between private repositories and unexistent repositories on GitHub. So it returns `ErrAuthorizationRequired` for both.
NewErr returns a new Err based on a http response
type AuthMethod interface { transport.AuthMethod SetAuth(r *http.Request) }
AuthMethod is concrete implementation of common.AuthMethod for HTTP services
BasicAuth represent a HTTP basic auth
Name is name of the auth
Err is a dedicated error to return errors based on status code
StatusCode returns the status code of the response
TokenAuth implements an http.AuthMethod that can be used with http transport to authenticate with HTTP token authentication (also known as bearer authentication).
IMPORTANT: If you are looking to use OAuth tokens with popular servers (e.g. GitHub, Bitbucket, GitLab) you should use BasicAuth instead. These servers use basic HTTP authentication, with the OAuth token as user or password. Check the documentation of your git server for details.
Name is name of the auth
Package http imports 16 packages (graph) and is imported by 1 packages. Updated 2020-08-15. Refresh now. Tools for package owners.