#[non_exhaustive]pub enum RemoteUnreadableReason {
RepositoryNotFound,
Transport {
detail: String,
},
HttpStatus {
status: u16,
},
NotGitServer {
status: u16,
content_type: Option<String>,
},
NoHandshake,
}Expand description
Why a remote could not be read or written (Error::RemoteUnreadable).
Every reason is a failure to talk to the remote at all, as opposed to the remote refusing
an update. Self::Transport is the one usually worth retrying on a flaky network.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RepositoryNotFound
A local path or file:// URL does not name a Git directory (valid HEAD, plus
objects/ and refs/ in the common directory).
Transport
The connection failed or broke: name resolution, refused or reset connection, TLS, or timeouts.
HttpStatus
A smart-HTTP server answered with an error status other than an authentication
challenge (those are Error::Auth).
NotGitServer
An HTTP response looked successful but was not a Git smart-HTTP ref advertisement
(for example 200 text/html from a parked or mistyped host).
Fields
NoHandshake
The transport ran, but the remote never completed the Git protocol handshake (for
example ssh exited, or a git:// peer closed, before any ref advertisement).