You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.L.Error("Your system is misconfigure or in a broken state. Probably your hosts.toml files have error, or your ~/.docker/config.json file is hosed")
124
+
casenerderr.ErrInvalidArgument:
125
+
log.L.Error("Invalid arguments provided")
126
+
casenerderr.ErrServerIsMisbehaving:
127
+
log.L.Error("The registry server you are trying to log into is possibly misconfigured, or otherwise misbehaving")
128
+
caselogin.ErrCredentialsCannotBeRead:
129
+
log.L.Error("Nerdctl cannot login without a username and password")
130
+
caselogin.ErrConnectionFailed:
131
+
log.L.Error("Failed establishing a connection. There was a DNS, TCP, or TLS issue preventing nerdctl from talking to the registry")
132
+
caselogin.ErrAuthenticationFailure:
133
+
log.L.Error("Authentication failed. Provided credentials were refused by the registry")
134
+
}
135
+
/*
136
+
var dnsErr *net.DNSError
137
+
var sysCallErr *os.SyscallError
138
+
var opErr *net.OpError
139
+
var urlErr *url.Error
140
+
var tlsErr *tls.CertificateVerificationError
141
+
// Providing understandable feedback to user for specific errors
142
+
if errors.Is(err, login.ErrLoginCredentialsCannotBeRead) {
143
+
log.L.Errorf("Unable to read credentials from docker store (~/.docker/config.json or credentials helper). Please manually inspect.")
144
+
} else if errors.Is(err, login.ErrLoginCredentialsCannotBeWritten) {
145
+
log.L.Errorf("Though the login was succesfull, credentials could not be saved to the docker store (~/.docker/config.json or credentials helper). Please manually inspect.")
146
+
} else if errors.Is(err, login.ErrLoginCredentialsRefused) {
147
+
log.L.Errorf("Unable to login with the provided credentials")
148
+
} else if errors.As(err, &dnsErr) {
149
+
if dnsErr.IsNotFound && !dnsErr.IsTemporary {
150
+
// donotresolveeverever.foo
151
+
log.L.Errorf("domain name %q is unknown to your DNS server %q (hint: is the domain name spelled correctly?)", dnsErr.Name, dnsErr.Server)
152
+
} else if dnsErr.Timeout() {
153
+
// resolve using an unreachable DNS server
154
+
log.L.Errorf("unable to get a timely response from your DNS server %q (hint: is your DNS configuration ok?)", dnsErr.Server)
155
+
} else {
156
+
debErr, _ := json.Marshal(dnsErr)
157
+
log.L.Errorf("non-specific DNS resolution error (timeout: %t):\n%s", dnsErr.Timeout(), string(debErr))
158
+
}
159
+
} else if errors.Is(err, http.ErrSchemeMismatch) {
160
+
log.L.Errorf("the server does not speak https")
161
+
} else if errors.As(err, &sysCallErr) {
162
+
if sysCallErr.Syscall == "connect" {
163
+
// Connect error - no way to reach that server, or server dropped us immediately
0 commit comments