sourcegraph / src-cli

Sourcegraph CLI
https://sourcegraph.com
Apache License 2.0
267 stars 57 forks source link

Print warning on unusual syntax for SRC_ACCESS_TOKEN #1076

Closed varungandhi-src closed 1 month ago

varungandhi-src commented 1 month ago

Recently we had a customer issue GRAPH-127 where a SCIP upload was failing, but the failure was due to the customer code wrapping src-cli passing a truncated/empty/malformed token. Debugging this would've been easier had src-cli printed a warning message in the log indicating something unusual with the token.

varungandhi-src commented 1 month ago

We can reuse the code here: https://sourcegraph.com/github.com/sourcegraph/sourcegraph@main/-/blob/internal/accesstoken/personal_access_token.go?L29-37