Skip to content

docs/auth: clarify OAuth and access token setup - #1356

Open
eugenio-sanchez-sg wants to merge 1 commit into
mainfrom
docs/update-auth-readme
Open

docs/auth: clarify OAuth and access token setup#1356
eugenio-sanchez-sg wants to merge 1 commit into
mainfrom
docs/update-auth-readme

Conversation

@eugenio-sanchez-sg

@eugenio-sanchez-sg eugenio-sanchez-sg commented Jul 29, 2026

Copy link
Copy Markdown

What changed

Updated the README to clearly explain how to connect and authenticate to a Sourcegraph instance.

Added

  • Instructions for setting SRC_ENDPOINT on macOS, Linux, and Windows.
  • A note that src defaults to https://sourcegraph.com when SRC_ENDPOINT is not set.
  • A dedicated OAuth section explaining:
  • Run src login to authenticate interactively.
  • OAuth does not require SRC_ACCESS_TOKEN.
  • OAuth credentials are stored in the operating system’s native keyring.
  • SRC_ENDPOINT must remain set so future commands can find the correct OAuth credential.
  • Passing a URL to src login only selects the endpoint for that login command.
  • Documentation for:
  • src auth token, which prints the active token.
  • src auth token --header, which prints a complete Authorization header.
  • A dedicated personal access token section explaining:
  • Access tokens are recommended for CI, scripts, and other non-interactive environments.
  • Both SRC_ENDPOINT and SRC_ACCESS_TOKEN must be set.
  • SRC_ACCESS_TOKEN takes precedence over an OAuth credential.
  • Running src login is unnecessary when SRC_ACCESS_TOKEN is set.
  • Shell and PowerShell examples for both endpoint and access-token configuration.
  • src auth to the README’s list of available commands.
  • The previous section anchor so existing links to the old heading continue to work.

Removed

  • The outdated introduction that instructed users to run src login SOURCEGRAPH-URL.
  • The implication that passing a URL to src login configures future commands.
  • The old combined instructions that treated SRC_ENDPOINT and SRC_ACCESS_TOKEN as required together for every login.
  • The duplicated macOS, Linux, and Windows configuration sections.

This is a documentation-only change.

Explain endpoint configuration, OAuth keyring credentials, and personal access token authentication for non-interactive use. Document the src auth token commands and preserve the previous section anchor.

Amp-Thread-ID: https://ampcode.com/threads/T-019faf06-8fb0-77ce-b64c-706d253bba28
Co-authored-by: Amp <amp@ampcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants