Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@
Add product names and identifiers to `cspell-allow-list.txt`, in
alphabetical order; the check reports out-of-order entries. CSpell is not a
project dependency: `npx cspell@10 --no-progress <file>` to run it locally
- **Placeholder hostnames**: in prose and config samples write
`sourcegraph.example.com` for the reader's instance
(`https://sourcegraph.example.com` where a whole URL is meant) and
`github.example.com` for a code host; never `<URL>`, `[hostname]`, or a
`$VARIABLE` the reader has to guess. In a shell snippet a `$VARIABLE` is
fine only when the same snippet exports it with an example value. Example
URLs use `https://`, except loopback, in-cluster, proxy, and XML-namespace
addresses. The `🤖 Sync generated docs` PRs overwrite the
`SCHEMA_SYNC_START`…`SCHEMA_SYNC_END` blocks and whole pages
(`self-hosted/observability/{alerts,dashboards}.mdx`, `cli/references/`,
`ai/models.mdx`, `cody/capabilities/supported-models.mdx`,
`admin/telemetry/`); fix those in sourcegraph/sourcegraph instead.
`git log --author=sourcegraph-buildkite -- <file>` shows whether a page is one

### Links

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/auth/saml/microsoft-adfs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ This section covers troubleshooting tips if the following is true:
1. Find the event corresponding to the failed login. This should have Level "Error".

The error log message will indicate something about the root cause of the error. A common error
message is `The requested relying party trust '<URL>' is unspecified or unsupported`. If this is the
message is `The requested relying party trust 'https://sourcegraph.example.com' is unspecified or unsupported`. If this is the
error, double-check the relying party identifiers of the Relying Party Trust entry in ADFS:

- Open **AD FS Management**.
Expand Down
6 changes: 3 additions & 3 deletions docs/admin/auth/saml/okta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
2. On the left hand side, click on the “Applications” menu, and then select the “Applications” item.
3. Click on “Create App Integration”. Another screen should pop-up, listing sign-in methods. Choose “SAML 2.0”. Click "Next".
4. You should now see “Create SAML Integration” on this page, and you will be on “General Settings”. Specify a name for “App name” (example: “Sourcegraph”) and the [logo](https://sourcegraphstatic.com/sourcegraph-logo-asterisk-color-1024px.png). Click “Next”.
5. Now you should be on “Configure SAML”. On this page, you will need your Sourcegraph URL (Ex: `https://sourcegraph.example.com`). Follow along with the following instructions, replacing `<URL>` with your Sourcegraph URL:
5. Now you should be on “Configure SAML”. On this page, you will need your Sourcegraph URL. Follow along with the following instructions, replacing `https://sourcegraph.example.com` with your Sourcegraph URL:
- In section A ("SAML Settings"), under "General":
- For “Single sign on URL”, set the value to `<URL>`/.auth/saml/acs
- For “Single sign on URL”, set the value to `https://sourcegraph.example.com/.auth/saml/acs`
- Under this box, there should be a checkbox labeled “Use this for Recipient URL and Destination URL”. Check the box if it is not already selected.
- For “Audience URI (SP Entity ID)”, set the value to `<URL>`/.auth/saml/metadata
- For “Audience URI (SP Entity ID)”, set the value to `https://sourcegraph.example.com/.auth/saml/metadata`
- For "Name ID format", choose "EmailAddress"
- In the section titled “Attribute Statements (optional)”:
- Set the following Name and Values, leaving the Name format to “Unspecified”
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/auth/saml/one-login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{
"type": "saml",
"configID": "onelogin",
"identityProviderMetadataURL": "<issuer URL>"
"identityProviderMetadataURL": "https://example.onelogin.com/saml/metadata/123456"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/config/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Notices can be added in global, organization, or user settings. The `notices` se
```json
"notices": [
{
"message": "Your important message here! [Include a link for more information](http://example.com).",
"message": "Your important message here! [Include a link for more information](https://example.com).",
"location": "top",
"dismissible": true,
"variant": "danger",
Expand Down
4 changes: 2 additions & 2 deletions docs/admin/organizations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Organizations are named groups of users with an associated JSON settings file (with search scopes, saved queries, etc.). These settings take effect for all users who are members of the organization.

To create an organization, go to `http(s)://[hostname]/organizations/new` on your Sourcegraph instance (or, from any page, click your username and then **New organization**).
To create an organization, go to `https://sourcegraph.example.com/organizations/new` on your Sourcegraph instance (or, from any page, click your username and then **New organization**).

You (and any other organization members, and any site admin) may add or remove members from the organization's members page at `http(s)://[hostname]/organizations/[org-name]/members`.
You (and any other organization members, and any site admin) may add or remove members from the organization's members page at `https://sourcegraph.example.com/organizations/[org-name]/members`.

To automatically join all users on your instance to a specific organization, create the organization first and then set the `auth.userOrgMap` [site configuration](/admin/config/site-config) option:

Expand Down
14 changes: 9 additions & 5 deletions docs/admin/repo/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ By default, Sourcegraph polls code hosts to keep repository contents up to date.

Polling, however, falls short in cases where immediate updates are desired or when the number of repositories causes significant load on the code host.

To address this, there is a repository update webhook that triggers a repository update on Sourcegraph within minutes. The webhook is authenticated using access tokens (which you can create at e.g. `https://sourcegraph.example.com/site-admin/tokens`).
To address this, there is a repository update webhook endpoint which adds a high priority job to the repo fetch queue.

Here's an example using curl.
The webhook endpoint is authenticated using access tokens which you can create at `https://sourcegraph.example.com/site-admin/tokens`

Here's an example using curl:

```bash
curl -XPOST -H 'Authorization: token $ACCESS_TOKEN' $SOURCEGRAPH_ORIGIN/.api/repos/$REPO_NAME/-/refresh
curl -XPOST \
-H 'Authorization: token $SRC_ACCESS_TOKEN' \
https://sourcegraph.example.com/.api/repos/$REPO_NAME/-/refresh
```

## Disabling built-in repo updating

Sourcegraph will periodically ask your code-host to list its repositories (e.g. via its HTTP API) to _discover repositories_. You can control how often this occurs by changing [`repoListUpdateInterval`](/admin/config/site-config) in the site config.
Sourcegraph will periodically ask your code host to list its repositories via its HTTP API to _discover repositories_. You can control how often this occurs by changing [`repoListUpdateInterval`](/admin/config/site-config) in the site config.

For repositories that Sourcegraph is already aware of, it will periodically perform background Git repository updates. You can disable this if you wish by setting [`disableAutoGitUpdates`](/admin/config/site-config) to `true`. In which case, the repository will only update when the webhook is used or, e.g., if a user visits the repository directly. This may be desirable in cases where you wish to rely solely on the repository update webhook, for example.
For repositories that Sourcegraph is already aware of, it will periodically perform background git repository updates. You can disable this if needed by setting [`disableAutoGitUpdates`](/admin/config/site-config) to `true`, then the repository will only be updated when the webhook is used or when a user visits the repository directly.

## Code host webhooks

Expand Down
2 changes: 1 addition & 1 deletion docs/analytics/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Sourcegraph Analytics API is an API that provides programmatic access to you

For Sourcegraph Analytics, you can generate an access token for programmatic access. Tokens are long-lived with an optional expiry and have the same permissions to access instance data as the user who created them.

To get started, visit the [Sourcegraph Analytics access tokens management page](http://analytics.sourcegraph.com/access-tokens). From here, you can create, view, and revoke access tokens for your Sourcegraph Account.
To get started, visit the [Sourcegraph Analytics access tokens management page](https://analytics.sourcegraph.com/access-tokens). From here, you can create, view, and revoke access tokens for your Sourcegraph Account.

## API reference

Expand Down
2 changes: 1 addition & 1 deletion docs/batch-changes/how-src-executes-a-batch-spec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Downloads the archive of a repository. It's equivalent to:
```bash
curl -L -v -X GET -H 'Accept: application/zip' \
-H 'Authorization: token <SRC_ACCESS_TOKEN>' \
'http://sourcegraph.example.com/github.com/my-org/my-repo@refs/heads/master/-/raw' \
'https://sourcegraph.example.com/github.com/my-org/my-repo@refs/heads/master/-/raw' \
--output ~/tmp/my-repo.zip
```

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/explanations/env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ If your instance is behind an authenticating proxy that requires additional head
Example passing env vars src command:

```bash
SRC_HEADER_AUTHORIZATION="Bearer $(curl http://service.example.com)" SRC_HEADER_EXTRA=metadata src search 'foobar'
SRC_HEADER_AUTHORIZATION="Bearer $(curl https://service.example.com)" SRC_HEADER_EXTRA=metadata src search 'foobar'
```

In the above example, the headers `authorization: Bearer my-generated-token` and `extra: metadata` will be threaded to all HTTP requests to your instance. Multiple such headers can be supplied.
Expand Down
2 changes: 1 addition & 1 deletion docs/code-navigation/auto-indexing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ For auto-indexing jobs to be able to build your projects that use private reposi
For Go resolver to access private Git repositories, you need to configure a `NETRC_DATA` secret with the following contents:

```text
machine <your-git-host> login <git-user-login> password <github-token-or-password>
machine github.example.com login <git-user-login> password <github-token-or-password>
```

Under the hood, this information will be used to write the [.netrc](https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html) file that is respected by Git and Go.
Expand Down
8 changes: 4 additions & 4 deletions docs/cody/capabilities/proxy-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ VS Code supports HTTP, HTTPS, and SOCKS proxies. The `http.proxy` setting in `se
### Using the Proxy with Cody

1. Open Cody settings within your JetBrains IDE
2. Connect to the Sourcegraph instance using the provided instance IP and token:
- **Instance IP:** `http://instance_ip`
2. Connect to the Sourcegraph instance using the provided instance URL and token:
- **Instance URL:** `https://sourcegraph.example.com`
- **Token:** `your_token`
3. Click `Apply`, then `OK`, and test the connection

Expand All @@ -115,10 +115,10 @@ JetBrains supports HTTP and SOCKS proxies. The `Manual Proxy Configuration` in t

### Basic Connectivity Test

To verify that your proxy setup works, use the following `curl` command in your terminal, replacing `proxy_ip` and `instance_ip` with your actual proxy and instance IP addresses:
To verify that your proxy setup works, use the following `curl` command in your terminal, replacing `proxy_ip:port` and `sourcegraph.example.com` with your actual proxy address and instance URL:

```bash
curl -x http://proxy_ip:port http://instance_ip
curl -x http://proxy_ip:port https://sourcegraph.example.com
```

This command should return a response from the instance, confirming that the proxy is correctly routing your requests.
Expand Down
2 changes: 1 addition & 1 deletion docs/cody/clients/install-neovim.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The `sg.nvim` extension supports the following features for Sourcegraph Search:

| **Feature** | **Description** |
| ---------------------------- | --------------------------------------------------------------------------------------------- |
| **Read files** | Directly from sourcegraph links: `:edit <sourcegraph url>` |
| **Read files** | Directly from sourcegraph links: `:edit https://sourcegraph.example.com/github.com/tjdevries/sam.py/-/blob/src/sam.py` |
| | Automatically adds protocols for `https://sourcegraph.com/*` links |
| | Directly from buffer names `:edit sg://github.com/tjdevries/sam.py/-/src/sam.py` |
| **Read non-files** | Repository roots, folders (both expanded and non-expanded), open file from folder |
Expand Down
4 changes: 2 additions & 2 deletions docs/cody/enterprise/model-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ Sourcegraph natively supports several types of LLM API providers. The current se
| `"azureOpenAI"` | [Microsoft Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service/) |
| `"anthropic"` | [Anthropic](https://www.anthropic.com) |
| `"fireworks"` | [Fireworks AI](https://fireworks.ai) |
| `"google"` | [Google Gemini](http://cloud.google.com/gemini) and [Vertex](https://cloud.google.com/vertex-ai/) |
| `"openai"` | [OpenAI](http://platform.openai.com) |
| `"google"` | [Google Gemini](https://cloud.google.com/gemini) and [Vertex](https://cloud.google.com/vertex-ai/) |
| `"openai"` | [OpenAI](https://platform.openai.com) |
| `"huggingface-tgi"` | [Hugging Face Text Generation Interface](https://huggingface.co/docs/text-generation-inference/en/index) |

The configuration for `serverSideConfig` varies by provider type.
Expand Down
6 changes: 3 additions & 3 deletions docs/cody/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,19 @@ Starting June 25, you cannot sign up for new Cody Free or Cody Pro accounts, and
If you're a Cody Free user:

- You will have access to Cody Free until July 23, 2025. After this, you'll no longer be able to use Cody.
- Instead, you can sign up with Amp and receive **$10 in free credits** at [ampcode.com](http://ampcode.com/).
- Instead, you can sign up with Amp and receive **$10 in free credits** at [ampcode.com](https://ampcode.com/).

If you're a Cody Pro user:

- You will have access to Cody Pro until July 23, 2025. After this, you'll no longer be able to use Cody.
- You **will not be charged for Cody Pro** between now and July 23, 2025.
- Cody Pro customers can sign up with Amp today at [ampcode.com](http://ampcode.com) and receive **$10 in free credits** **plus $30 additional free credits** as a thank you for using Cody Pro.
- Cody Pro customers can sign up with Amp today at [ampcode.com](https://ampcode.com) and receive **$10 in free credits** **plus $30 additional free credits** as a thank you for using Cody Pro.

If you're on Enterprise Starter:

- Your workspaces will have Cody access until \*July 23, 2025, after which Cody's access will be removed.
- Your Enterprise Starter subscription remains fully supported for Code Search, with upcoming improvements like Deep Search.
- Enterprise Starter customers can sign up with Amp today at [ampcode.com](http://ampcode.com) and receive **$10 in free credits** **plus $30 additional free credits** as a thank you for using Enterprise Starter.
- Enterprise Starter customers can sign up with Amp today at [ampcode.com](https://ampcode.com) and receive **$10 in free credits** **plus $30 additional free credits** as a thank you for using Enterprise Starter.

If you're an Enterprise user:

Expand Down
2 changes: 1 addition & 1 deletion docs/integration/gitolite.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gitolite integration with Sourcegraph

You can use Sourcegraph with [Gitolite](http://gitolite.com/).
You can use Sourcegraph with [Gitolite](https://gitolite.com/).

| Feature | Supported? |
| ------------------------------------------------------------------- | ---------- |
Expand Down
6 changes: 3 additions & 3 deletions docs/self-hosted/deploy/kubernetes/configure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ Learn more about [Google Cloud Platform Firewall rules](https://cloud.google.com

Sourcegraph should now be accessible at `$EXTERNAL_ADDR:30080`, where `$EXTERNAL_ADDR` is the address of _any_ node in the cluster.

Learn more about [AWS Security Group rules](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html).
Learn more about [AWS Security Group rules](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html).

### Rancher Kubernetes Engine

Expand Down Expand Up @@ -1063,7 +1063,7 @@ Similar changes will be required for other pods and services, depending on the s

For optimal performance and resilience, it is recommended to use an external database when deploying Sourcegraph. For more information on database requirements, please refer to the [Postgres guide](/self-hosted/postgres).

To connect Sourcegraph to an existing PostgreSQL instance, add the relevant environment variables ([such as PGHOST, PGPORT, PGUSER, etc.](http://www.postgresql.org/docs/current/static/libpq-envars.html)) to the frontend ConfigMap by adding the new environment variables to the end of the _FRONTEND ENV VARS_ section at the bottom of your [kustomization file](/self-hosted/deploy/kubernetes/kustomize/#kustomizationyaml). For example:
To connect Sourcegraph to an existing PostgreSQL instance, add the relevant environment variables ([such as PGHOST, PGPORT, PGUSER, etc.](https://www.postgresql.org/docs/current/static/libpq-envars.html)) to the frontend ConfigMap by adding the new environment variables to the end of the _FRONTEND ENV VARS_ section at the bottom of your [kustomization file](/self-hosted/deploy/kubernetes/kustomize/#kustomizationyaml). For example:

```yaml
# instances/$INSTANCE_NAME/kustomization.yaml
Expand Down Expand Up @@ -1311,7 +1311,7 @@ components:

## Outbound Traffic

When working with an [Internet Gateway](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Internet_Gateway.html) or VPC it may be necessary to expose ports for outbound network traffic. Sourcegraph must open port 443 for outbound traffic to code hosts, and to enable [telemetry](/admin/pings) with Sourcegraph.com. Port 22 must also be opened to enable git SSH cloning by Sourcegraph. In addition, please make sure to apply other required changes to secure your cluster in a manner that meets your organization's security requirements.
When working with an [Internet Gateway](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Internet_Gateway.html) or VPC it may be necessary to expose ports for outbound network traffic. Sourcegraph must open port 443 for outbound traffic to code hosts, and to enable [telemetry](/admin/pings) with Sourcegraph.com. Port 22 must also be opened to enable git SSH cloning by Sourcegraph. In addition, please make sure to apply other required changes to secure your cluster in a manner that meets your organization's security requirements.

---

Expand Down
4 changes: 2 additions & 2 deletions docs/self-hosted/deploy/kubernetes/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ openTelemetry:
gateway:
env:
JAEGER_HOST:
value: 'http://your.jaeger.endpoint'
value: 'https://jaeger.example.com'
config:
traces:
exporters:
Expand Down Expand Up @@ -429,7 +429,7 @@ openTelemetry:
gateway:
env:
JAEGER_HOST:
value: 'http://your.jaeger.endpoint'
value: 'https://jaeger.example.com'
config:
traces:
exportersTlsSecretName: otel-collector-exporters-tls
Expand Down
Loading
Loading