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
2 changes: 1 addition & 1 deletion docs/admin/auth/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Set `allowSignup` to `true` to enable anyone with a GitHub account to sign up wi
If set to `false` or not set, sign-up will be blocked. In this case, new users will only be able to sign in after an admin creates their account on Sourcegraph.
The new user email, during their account creation, should match one of their GitHub verified emails.

> WARNING: If `allowSignup` is set to `true`, anyone with internet access to both your Sourcegraph instance and your GitHub url are able to sign up and login to your instance. In particular, if url is set to `https://github.com`, this means that anyone with a Github account could log in to your Sourcegraph instance and search your indexed code. Make sure to also configure the `allowOrgs` field described below to limit sign-ups to your org, or limit public access to your Sourcegraph instance via IP restrictions / VPN. For assistance, contact support.
> WARNING: If `allowSignup` is set to `true`, anyone with internet access to both your Sourcegraph instance and your GitHub url are able to sign up and login to your instance. In particular, if url is set to `https://github.com`, this means that anyone with a GitHub account could log in to your Sourcegraph instance and search your indexed code. Make sure to also configure the `allowOrgs` field described below to limit sign-ups to your org, or limit public access to your Sourcegraph instance via IP restrictions / VPN. For assistance, contact support.

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/auth/login-form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ when the `Other login methods` button is clicked.
### Change label of auth provider button

By default Sourcegraph shows a button for each auth provider, such as `Continue with GitHub`. The text label for the button
is created from 2 parts: `Continue with` prefix and `Github`. These can be controlled with `displayPrefix` and `displayName`
is created from 2 parts: `Continue with` prefix and `GitHub`. These can be controlled with `displayPrefix` and `displayName`
optional parameters of auth provider in [advanced configuration](/admin/config/site-config):

Example [advanced configuration](/admin/config/site-config):
Expand Down
16 changes: 8 additions & 8 deletions docs/admin/code-hosts/github.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ There are three ways to connect a GitHub App:

To create a GitHub App and connect it to Sourcegraph:

1. Go to **Administration > Repositories > Github Apps** on Sourcegraph.
1. Go to **Administration > Repositories > GitHub Apps** on Sourcegraph.

![The GitHub Apps page on Sourcegraph](https://sourcegraphstatic.com/docs/images/administration/config/github-apps/github-apps-list-dark.png)

Expand Down Expand Up @@ -91,7 +91,7 @@ Once public, App can be installed in additional namespaces either from Sourcegra

##### Installing from Sourcegraph

1. Go to **Administration > Repositories > Github Apps** and click **Edit** on the App you want to install in another namespace. You'll be taken to the App details page.
1. Go to **Administration > Repositories > GitHub Apps** and click **Edit** on the App you want to install in another namespace. You'll be taken to the App details page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This passage was already duplicated, and is now out of step with:

The passage you changed is also written somewhere else, so the two copies now disagree. Decide which page is the home for it, and replace the other copy with a link; or make the same change there too.


![The GitHub App details page on Sourcegraph](https://sourcegraphstatic.com/docs/images/administration/config/github-apps/github-app-post-create-dark.png)

Expand All @@ -112,7 +112,7 @@ Once public, App can be installed in additional namespaces either from Sourcegra
1. Go to the GitHub App page. You can get here easily from Sourcegraph by clicking **View in GitHub** for the App you want to install in another namespace.
2. Click **Configure**, or go to **App settings > Install App**, and select the organization or user account you want to install the App on.
3. As before, you will be asked to review the App permissions and select which repositories the App can access before installing it in a namespace. Once you click **Install** and the setup completes, you will be redirected back to Sourcegraph.
4. GitHub App installations will be automatically synced in the background. Return to **Administration > Repositories > Github Apps** and click **Edit** on the App you added the new installation for. You'll be taken to the App details page. Once synced, you will see the new installation listed.
4. GitHub App installations will be automatically synced in the background. Return to **Administration > Repositories > GitHub Apps** and click **Edit** on the App you added the new installation for. You'll be taken to the App details page. Once synced, you will see the new installation listed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This passage was already duplicated, and is now out of step with:

The passage you changed is also written somewhere else, so the two copies now disagree. Decide which page is the home for it, and replace the other copy with a link; or make the same change there too.


![The GitHub App details page on Sourcegraph, scrolled to show a second new installation](https://sourcegraphstatic.com/docs/images/administration/config/github-apps/github-app-post-multi-install-dark.png)

Expand All @@ -136,7 +136,7 @@ Use these steps to connect a GitHub App that was created outside Sourcegraph, su
1. On the App's settings page on GitHub, copy the **Client ID**.
2. Under **Private keys**, click **Generate a private key**. GitHub downloads the key as a `.pem` file.
3. To use the App for sign-in and repository permissions, under **Client secrets**, click **Generate a new client secret** and copy it. GitHub shows the secret only once.
4. Go to **Administration > Repositories > Github Apps** on Sourcegraph.
4. Go to **Administration > Repositories > GitHub Apps** on Sourcegraph.
5. Click **Add an existing GitHub App**.
6. Enter the following details of your existing GitHub App:
- **GitHub URL**: The URL of your GitHub instance (e.g., `https://github.com` or `https://github.example.com`)
Expand Down Expand Up @@ -211,7 +211,7 @@ You can uninstall a GitHub App from a namespace or remove it altogether at any t

To remove an installation in a single namespace, click **View in GitHub** for the installation you want to remove. If you are able to administer Apps in this namespace, you will see **Uninstall "[APP NAME]"** in the "Danger zone" at the bottom of the page. Click **Uninstall** to remove the App from this namespace. Sourcegraph will periodically sync installations in the background. It may temporarily throw errors related to the missing installation until the sync completes. You can check the GitHub App details page to confirm the installation has been removed.

To remove an App entirely, go to **Administration > Repositories > Github Apps** and click **Remove** for the App you want to remove. You will be prompted to confirm you want to remove the App from Sourcegraph. Once removed from the Sourcegraph side, Sourcegraph will no longer communicate with your GitHub instance via the App unless explicitly reconnected. However, the App will still exist on GitHub unless manually deleted there, as well.
To remove an App entirely, go to **Administration > Repositories > GitHub Apps** and click **Remove** for the App you want to remove. You will be prompted to confirm you want to remove the App from Sourcegraph. Once removed from the Sourcegraph side, Sourcegraph will no longer communicate with your GitHub instance via the App unless explicitly reconnected. However, the App will still exist on GitHub unless manually deleted there, as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This passage was already duplicated, and is now out of step with:

The passage you changed is also written somewhere else, so the two copies now disagree. Decide which page is the home for it, and replace the other copy with a link; or make the same change there too.


### GitHub App token use

Expand Down Expand Up @@ -364,7 +364,7 @@ Then, add or edit the GitHub connection as described above and include the `auth
}
```

This needs to be done for every github code host connection if there is more than one configured.
This needs to be done for every GitHub code host connection if there is more than one configured.

Repo-centric permission syncing is done by calling the [list repository collaborators GitHub API endpoint](https://docs.github.com/en/rest/collaborators/collaborators#list-repository-collaborators). To call this API endpoint correctly, we need a [GitHub access token](#github-api-access) with the required scopes and read and write access to all relevant repositories.

Expand Down Expand Up @@ -404,15 +404,15 @@ If you would like internal repositories to remain private, but you're experienci

### Trigger permissions sync from GitHub webhooks

Follow the link to [configure webhooks for permissions for Github](/admin/webhooks/incoming#user-permissions)
Follow the link to [configure webhooks for permissions for GitHub](/admin/webhooks/incoming#user-permissions)

### Teams and organizations permissions caching

> NOTE: This is an experimental feature.

> WARNING: The following section is experimental and might not work properly. Please prefer [configuring webhooks for permissions instead](/admin/webhooks/incoming#user-permissions)

Github code host can leverage caching mechanisms to reduce the number of API calls used when syncing permissions. This can significantly reduce the amount of time it takes to perform a full cycle of permissions sync due to reduced instances of being rate limited by the code host, and is useful for code hosts with very large numbers of users and repositories.
GitHub code host can leverage caching mechanisms to reduce the number of API calls used when syncing permissions. This can significantly reduce the amount of time it takes to perform a full cycle of permissions sync due to reduced instances of being rate limited by the code host, and is useful for code hosts with very large numbers of users and repositories.

Sourcegraph can leverage caching of GitHub [team](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository) and [organization](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization) permissions.

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/config/authorization-and-authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ In this way, access to Sourcegraph will still be managed by your identity provid

Follow these steps to [configure authentication with GitHub via OAuth](/admin/auth/#github).

Once authentication with GitHub via OAuth is configured, follow [these steps to configure access permissions](/admin/code-hosts/github#repository-permissions). Users will log into Sourcegraph using Github OAuth, and permissions will be synced in the background.
Once authentication with GitHub via OAuth is configured, follow [these steps to configure access permissions](/admin/code-hosts/github#repository-permissions). Users will log into Sourcegraph using GitHub OAuth, and permissions will be synced in the background.

### GitLab Enterprise or GitLab Cloud authentication and authorization

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/how-to/internal-github-repos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This document assumes that you have:

- Administrator level permissions on your Sourcegraph instance.
- Access to your Sourcegraph deployment.
- Internal Github repositories in your organization.
- Internal GitHub repositories in your organization.

## Steps to import internal GitHub repositories

Expand Down
4 changes: 2 additions & 2 deletions docs/admin/how-to/update-repo-failure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ You check logs from the `worker` container and you should find the following bel

## Resolution

- Look through your PATs (Personal Access Token) and you would find out that the token for syncing github to Sourcegraph has expired.
- Create a new PAT (Personal Access Token) in Github and update the token value below with the new token generated.
- Look through your PATs (Personal Access Token) and you would find out that the token for syncing GitHub to Sourcegraph has expired.
- Create a new PAT (Personal Access Token) in GitHub and update the token value below with the new token generated.
- You can also delete expired credentials.
- Refresh your Sourcegraph instance and click the `update repositories` button, You would see that you are able to add your new repo without any errors.

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/permissions/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The `bindID` value specifies how to uniquely identify users when setting permiss

After you enable the permissions API, you must [set permissions](#setting-repository-permissions-for-users) to allow users to view repositories (administrators bypass all permissions checks and can always view all repositories).

> NOTE: If you were previously using [permissions syncing](/admin/permissions/syncing), e.g. syncing permissions from Github, then those permissions are used as the initial state after enabling explicit permissions. Otherwise, the initial state is for all repositories to have an empty set of authorized users, so users will not be able to view any repositories.
> NOTE: If you were previously using [permissions syncing](/admin/permissions/syncing), e.g. syncing permissions from GitHub, then those permissions are used as the initial state after enabling explicit permissions. Otherwise, the initial state is for all repositories to have an empty set of authorized users, so users will not be able to view any repositories.

> NOTE: In some cases, in order for the repo permissions to be enforced, you must re-save the code host connection configuration with some modification to the JSON after enabling the permissions API.

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/permissions/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Sourcegraph allows customers to use webhooks to react to events that modify user permissions
on the code host. Currently the only supported code host for webhooks
is [Github](/admin/code-hosts/github).
is [GitHub](/admin/code-hosts/github).

> NOTE: Using webhooks is the _recommended_ way to get code host permissions to Sourcegraph. It's important to also note that when you have webhooks configured, it override Sourcegraph's default heuristics for fetching repository permissions. This is because webhooks and explicit configurations are intended to enforce specific permissions from external services, while the default heuristics act as a fallback when no explicit permissions are provided.

Expand Down
2 changes: 1 addition & 1 deletion docs/batch-changes/requirements.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ While the latest version of the Sourcegraph server is always recommended, **vers

Batch Changes is compatible with the following code hosts:

- Github.com
- GitHub.com
- GitHub Enterprise Server 3.4 and later
- GitLab 12.7 and later (burndown charts are only supported with 13.2 and later)
- Bitbucket Server 5.7 and later, Bitbucket Data Center 7.6 and later
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ If you are indexing a JavaScript codebase or a project using Yarn workspaces, tw

```sh
SRC_ENDPOINT=https://sourcegraph.example.com src code-intel upload # for private instances
src code-intel upload -github-token=<your github token> # for public instances
src code-intel upload -github-token=<your GitHub token> # for public instances
```

The upload command will provide a URL you can visit to see the upload status. Once the upload has finished processing, you can visit the repo and enjoy precise code navigation!
Loading