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
return"The provided Sourcegraph access token does not match the expected format (sgp_<40 hex chars> or sgp_<instance-id>_<40 hex chars>). Was it copied incorrectly or truncated?"
278
287
}
279
-
} else {
280
-
actionableHints=append(actionableHints,
281
-
"Verification is supported for the following code hosts: github.com, gitlab.com.",
282
-
"Please request support for additional code host verification at https://github.com/sourcegraph/sourcegraph/issues/4967.",
283
-
)
288
+
return"The Sourcegraph access token may be invalid, expired, or you may be connecting to the wrong Sourcegraph instance."
289
+
}
290
+
ifisForbidden {
291
+
return"You may not have sufficient permissions on this Sourcegraph instance."
// gitHubTokenHint returns a hint about the GitHub token.
308
+
// Only called when gitHubToken is set or repo starts with "github.com".
309
+
funcgitHubTokenHint(isUnauthorizedbool) string {
310
+
ifcodeintelUploadFlags.gitHubToken=="" {
311
+
returnfmt.Sprintf("No -github-token was provided. If this Sourcegraph instance enforces code host authentication, retry with -github-token=<token> for a token with access to %s.", codeintelUploadFlags.repo)
312
+
}
313
+
ifisUnauthorized {
314
+
return"The supplied -github-token may be invalid."
315
+
}
316
+
return"The supplied -github-token may lack the required permissions."
296
317
}
297
318
298
-
funcmergeStringSlices(ss...[]string) []string {
299
-
varcombined []string
300
-
for_, s:=rangess {
301
-
combined=append(combined, s...)
319
+
// gitLabTokenHint returns a hint about the GitLab token.
320
+
// Only called when gitLabToken is set or repo starts with "gitlab.com".
321
+
funcgitLabTokenHint(isUnauthorizedbool) string {
322
+
ifcodeintelUploadFlags.gitLabToken=="" {
323
+
returnfmt.Sprintf("No -gitlab-token was provided. If this Sourcegraph instance enforces code host authentication, retry with -gitlab-token=<token> for a token with access to %s.", codeintelUploadFlags.repo)
324
+
}
325
+
ifisUnauthorized {
326
+
return"The supplied -gitlab-token may be invalid."
302
327
}
328
+
return"The supplied -gitlab-token may lack the required permissions."
329
+
}
330
+
331
+
// uploadFailureReason returns the server's response body if available, or a
332
+
// generic reason derived from the HTTP status code.
0 commit comments