Skip to content

Commit bf85eb6

Browse files
Docs working branch for the October 2024 release (#671)
This is the docs working branch for the October 2024 release. Contain feature updates for: - SSH repo clone docs --------- Co-authored-by: Michael Lin <[email protected]>
1 parent d97950c commit bf85eb6

File tree

6 files changed

+57
-7
lines changed

6 files changed

+57
-7
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 September 2024 Release -->
3+
<!-- Working branch for October 2024 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

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: '5.7'
2+
DOCS_LATEST_VERSION: '5.8'
33
};
44

55
module.exports = config;

docs/admin/code_hosts/aws_codecommit.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,24 @@ To add CodeCommit repositories in Docker Container:
8787
1. Follow the rest of the steps detailed in the [AWS SSH setup guide](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-unixes.html) to make sure you can connect to the code host locally.
8888
1. Confirm you have the connection by running the following ssh command locally: `ssh git-codecommit.us-west-1.amazonaws.com` (Update link with your server region)
8989
1. Confirm you can clone the repository locally.
90+
91+
### Configuring SSH credentials in the Web UI
92+
93+
```json
94+
{
95+
"gitURLType": "ssh",
96+
"gitSSHKeyID": "<SSH key ID>",
97+
"gitSSHCredential": {
98+
// make sure the key is base64 encoded
99+
// $ cat ~/.ssh/id_rsa | base64
100+
"privateKey": "<base64 encoded of the SSH private key>",
101+
"passphrase": "<passphrase if applicable, omit if none is needed>"
102+
}
103+
}
104+
```
105+
106+
### Mounting SSH keys into the container
107+
90108
1. Copy all the files at your `$HOME/.ssh directory` to `$HOME/.sourcegraph/config/ssh` directory. See [docs](/admin/deploy/docker-single-container/#ssh-authentication-config-keys-knownhosts) for more information about our ssh file system.
91109
1. Read our [guide here](/admin/deploy/docker-compose/#git-ssh-configuration) for Docker Compose deployments
92110
1. Read our [guide here](/admin/deploy/kubernetes/configure#ssh-for-cloning) for Kubernetes deployments

docs/admin/repo/auth.mdx

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,47 @@ If authentication (HTTP(S) or SSH) is required to `git clone` a repository then
44

55
First, ensure your **Site admin > Manage code hosts** code host configuration is configured to use SSH. For example, by setting the `gitURLType` field to "ssh". Alternatively, you may use the "Generic Git host" code host type, which allows you to directly specify Git repository URLs for cloning.
66

7-
Then, follow the directions below depending on your deployment type:
7+
Then, you need to supply the SSH keys and passphrase to Sourcegraph if applicable. You have two options:
8+
9+
- **Option 1**: Configure the SSH credentials in code host configuration in the Web UI. (Recommended)
10+
- **Option 2**: Mount the SSH keys into the container.
11+
12+
## Configuring SSH credentials in the Web UI (Recommended)
13+
14+
In supported code hosts configuration, you can provide the credentials in the JSON configuration. For example:
15+
16+
```json
17+
{
18+
"url": "https://github.com",
19+
"token": "<personal access token>",
20+
"gitURLType": "ssh",
21+
"gitSSHCredential": {
22+
// make sure the key is base64 encoded
23+
// $ cat ~/.ssh/id_rsa | base64
24+
"privateKey": "<base64 encoded of the SSH private key>",
25+
"passphrase": "<passphrase if applicable, omit if none is needed>"
26+
}
27+
}
28+
```
29+
30+
Some providers may require additional configuration, consult the [code host specific documentation](/admin/code_hosts/) for more information.
31+
32+
## Mounting SSH keys into the container
833

934
- [Sourcegraph with Docker Compose](/admin/deploy/docker-compose/): See [the Docker Compose git configuration guide](/admin/deploy/docker-compose/#git-configuration).
1035
- [Sourcegraph with Kubernetes](/admin/deploy/kubernetes/): See [Configure repository cloning via SSH](/admin/deploy/kubernetes/configure#ssh-for-cloning).
1136
- [Single-container Sourcegraph](/admin/deploy/docker-single-container/): See [the single-container git configuration guide](/admin/deploy/docker-single-container/#git-configuration-and-authentication).
1237

13-
>NOTE: Repository access over SSH is not yet supported on [Sourcegraph Cloud](/cloud/).
14-
1538
## Troubleshooting
1639

40+
### Error: `illegal base64 data at input byte 0`
41+
42+
This error indicates that the provided private key is not base64-encoded. Ensure that the private key is base64-encoded before providing it to Sourcegraph.
43+
44+
```bash
45+
cat ~/.ssh/id_rsa | base64
46+
```
47+
1748
### What should be included in my config file?
1849

1950
We recommend adding the `StrictHostKeyChecking no` and `AddKeysToAgent yes` flags to prevent the need to give permission interactively when cloning from a new host.

docs/legacy.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<Accordion title="Sourcegraph 5.X">
66

7+
- [5.7](https://5.7.sourcegraph.com/)
78
- [5.6](https://5.6.sourcegraph.com/)
89
- [5.5](https://5.5.sourcegraph.com/)
910
- [5.4](https://5.4.sourcegraph.com/docs)

src/data/versions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export const versions: VersionI[] = [
1515
url: '/',
1616
},
1717
{
18-
name: 'v5.6',
19-
url: 'https://5.6.sourcegraph.com/'
18+
name: 'v5.7',
19+
url: 'https://5.7.sourcegraph.com/'
2020
},
2121
];
2222

0 commit comments

Comments
 (0)