Skip to content

Commit a6a192c

Browse files
Merge branch 'main' into al/fix-sslmode-docs
2 parents f57aa3b + 11945d2 commit a6a192c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+117846
-6125
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sourcegraph Docs
22

3-
<!-- Working branch for JAN 2025 Release -->
3+
<!-- Working branch for FEB 2025 Release -->
44

55
Welcome to the Sourcegraph documentation! We're excited to have you contribute to our docs. We've recently rearchitectured our docs tech stack — powered by Next.js, TailwindCSS and deployed on Vercel. This guide will walk you through the process of contributing to our documentation using the new tech stack.
66

baseai/memory/docs/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { MemoryI } from '@baseai/core';
22

33
const memoryDocs = (): MemoryI => ({
4-
name: 'docs',
5-
description: 'Docs folder of sourcegraph docs repository as an auto-synced memory',
4+
name: 'docs',
5+
description: 'Docs folder of sourcegraph docs repository as an auto-synced memory',
66
git: {
77
enabled: true,
8-
include: ['**/*'],
8+
include: ['**/*.mdx'],
99
gitignore: true,
10-
deployedAt: '',
11-
embeddedAt: '',
10+
deployedAt: '39f2778ad2dce348bb762a85f765c21453cec4fe',
11+
embeddedAt: ''
1212
},
13-
documents: {
13+
documents: {
1414
meta: doc => {
1515
const url = `https://sourcegraph.com/docs/${doc.path}`;
1616
return {

docs.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const config = {
2-
DOCS_LATEST_VERSION: '6.0'
2+
DOCS_LATEST_VERSION: '6.1'
33
};
44

55
module.exports = config;

docs/admin/code_hosts/gerrit.mdx

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ A Gerrit instance can be connected to Sourcegraph as follows:
2121
```json
2222
{
2323
"url": "https://gerrit.example.com/", // Be sure to add a trailing slash
24-
"username": "<admin username>",
25-
"password": "<admin password>",
24+
"username": "<username>",
25+
"password": "<password>",
2626
"projects": [ // If not set, all projects on the Gerrit instance will be mirrored
2727
"docs",
2828
"kubernetes/kubernetes"
@@ -33,15 +33,34 @@ A Gerrit instance can be connected to Sourcegraph as follows:
3333
"authorization": {} // Marks all repositories as private. Users will be required to present valid Gerrit HTTP credentials in order to view repositories
3434
}
3535
```
36-
4. The provided `username` and `password` must be the HTTP credentials of an admin account on Gerrit. See [the Gerrit HTTP documentation](https://gerrit-documentation.storage.googleapis.com/Documentation/2.14.2/user-upload.html#http) for details on how to generate HTTP credentials.
37-
<Callout type="note">The Gerrit instance has to have HTTPS clones enabled (the default). [`download.scheme=http`](https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#download). Sourcegraph cannot clone Gerrit repos via SSH.</Callout>
36+
4. The provided `username` and `password` must be the HTTP credentials of an account on Gerrit that has access to all the repositories that need to be cloned. See [the Gerrit HTTP documentation](https://gerrit-documentation.storage.googleapis.com/Documentation/2.14.2/user-upload.html#http) for details on how to generate HTTP credentials.
3837
5. Select **Add Repositories** to create the connection. Sourcegraph will start mirroring the specified projects.
3938

4039
If you added the `"authorization": {}` option to the configuration, and this is the first Gerrit code host connection you have created for this Gerrit instance, you might see a warning like this:
4140
![Warning indicating that an authentication provider is required for a code host connection](https://storage.googleapis.com/sourcegraph-assets/docs/images/administration/config/external-services/gerrit/gerrit-auth-warning.png)
4241

4342
Simply follow the steps in the next section to configure a Gerrit authentication provider.
4443

44+
### Clone using SSH
45+
46+
To clone using SSH, provide `"gitSSHCredential"` in the configuration:
47+
48+
```json
49+
{
50+
"url": "https://gerrit.example.com/",
51+
"username": "<username>",
52+
"password": "<password>",
53+
"projects": [
54+
"docs",
55+
"kubernetes/kubernetes"
56+
],
57+
"gitSSHCredential": {
58+
"privateKey": "..." // base64 encoded private key that will be used for cloning
59+
},
60+
"authorization": {}
61+
}
62+
```
63+
4564
## Add Gerrit as an authentication provider
4665

4766
If the `"authorization": {}` option has been set on a Gerrit code host connection, a Gerrit authentication provider will be required so that authroized users are able to search for and browse the code mirrored by that code host connection.

docs/admin/code_hosts/github.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# GitHub
22

3+
<TierCallout>
4+
Supported on all Sourcegraph [pricing](https://sourcegraph.com/pricing) plans.
5+
</TierCallout>
6+
37
Site admins can sync Git repositories hosted on [GitHub.com](https://github.com) and [GitHub Enterprise](https://enterprise.github.com) with Sourcegraph so that users can search and navigate the repositories.
48

59
There are 2 ways to connect with GitHub:

docs/admin/code_hosts/gitlab.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# GitLab
22

3+
<TierCallout>
4+
Supported on Sourcegraph [Free](/pricing/free) and [Enterprise](/pricing/enterprise) plans.
5+
</TierCallout>
6+
37
Site admins can sync Git repositories hosted on [GitLab](https://gitlab.com) (GitLab.com and GitLab CE/EE) with Sourcegraph so that users can search and navigate the repositories.
48

59
To connect GitLab to Sourcegraph:

docs/admin/code_hosts/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Code host connections
22

3+
<Callout type="info">Sourcegraph Enterprise Starter supports only GitHub as a code host connection. Enterprise plan can connect to all supported code hosts listed on this page.</Callout>
4+
35
Sourcegraph can sync repositories from code hosts and other similar services. We designate code hosts between Tier 1 and Tier 2 based on Sourcegraph's capabilities when used with those code hosts.
46

57
## Tier 1 code hosts

0 commit comments

Comments
 (0)