Skip to content

Commit e284ef4

Browse files
committed
fixup! Web browser and PAT support for GitLab.
1 parent 4f02496 commit e284ef4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/gitlab.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Git Credential Manager supports [gitlab.com](https://gitlab.com) out the box.
66

77
To use on another instance, eg. `https://gitlab.example.com` requires setup and configuration:
88

9-
1. [Create an OAuth application](https://docs.gitlab.com/ee/integration/oauth_provider.html). This can be at the user, group or instance level. Specify a name and use a redirect URI of `http://127.0.0.1/`. _Unselect_ the 'Confidential' option, and ensure the 'Expire access tokens' option is selected. Set the scope to 'write_repository'.
9+
1. [Create an OAuth application](https://docs.gitlab.com/ee/integration/oauth_provider.html). This can be at the user, group or instance level. Specify a name and use a redirect URI of `http://127.0.0.1/`. _Unselect_ the 'Confidential' option, and ensure the 'Expire access tokens' option is selected. Set the 'write_repository' and 'read_repository' scopes.
1010
1. Copy the application ID and configure `git config --global credential.https://gitlab.example.com.GitLabDevClientId <APPLICATION_ID>`
1111
1. Copy the application secret and configure `git config --global credential.https://gitlab.example.com.GitLabDevClientSecret <APPLICATION_SECRET>`
1212
1. Configure authentication modes to include 'browser' `git config --global credential.https://gitlab.example.com.gitLabAuthModes browser`

src/shared/GitLab/GitLabHostProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class GitLabHostProvider : HostProvider
1313
private static readonly string[] GitLabOAuthScopes =
1414
{
1515
"write_repository",
16+
"read_repository"
1617
};
1718

1819
private readonly IGitLabAuthentication _gitLabAuth;

0 commit comments

Comments
 (0)