Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
45ca69d
release: correct nupkg path for publishing
Dec 14, 2022
bb3c305
release: correct nupkg path for publishing (#995)
ldennington Dec 16, 2022
b7f2c83
secret service: fix error creating credential
Dec 16, 2022
21b1c38
secret service: fix error creating credential (#996)
ldennington Dec 16, 2022
0a93a98
docs(install): fix link to the ".NET tool" section
dscho Dec 22, 2022
233ac29
docs(install): fix link to the ".NET tool" section (#1007)
ldennington Dec 22, 2022
631bbed
release: fix tarball signing
Dec 22, 2022
34c0426
release: force xz compression for Debian package
Dec 28, 2022
0f9a3cf
release: fix tarball signing and Debian compression (#1009)
ldennington Jan 3, 2023
a28811f
build(deps): bump DavidAnson/markdownlint-cli2-action
dependabot[bot] Jan 3, 2023
7ca5519
build(deps): bump DavidAnson/markdownlint-cli2-action from 8.0.0 to 9…
ldennington Jan 3, 2023
a5df436
Swap order to match GitLab UI
bbodenmiller Jan 10, 2023
97f4ebd
Update gitlab.md
bbodenmiller Jan 10, 2023
bb09f61
Update gitlab.md
bbodenmiller Jan 10, 2023
b71abb1
Update gitlab.md
bbodenmiller Jan 10, 2023
f7d50a2
Update gitlab.md
bbodenmiller Jan 10, 2023
b091365
Update gitlab.md
bbodenmiller Jan 10, 2023
c7ed139
Update gitlab.md
bbodenmiller Jan 10, 2023
8141654
Fix typo
mderriey Jan 19, 2023
b8f58dd
docs: fix typo in rename.md
ldennington Jan 20, 2023
cf55a1c
Update gitlab.md
bbodenmiller Jan 20, 2023
c484477
docs: standardize gitlab documentation (#1023)
ldennington Jan 21, 2023
d0e5964
docs: update git credential cache platforms
Jan 23, 2023
5593bd4
docs: update git credential cache platforms (#1049)
ldennington Jan 23, 2023
e9ee764
basic-ui: fix bug in VM property
mjcheetham Jan 27, 2023
d1d5724
linux: ensure symbols tarball contains symbols
ldennington Jan 27, 2023
506afa6
linux: ensure symbols tarball contains symbols (#1061)
ldennington Jan 30, 2023
717b822
generic: add ability to read generic OAuth config
mjcheetham Jan 27, 2023
720a078
generic: add OAuth support for browser & devicecode
mjcheetham Jan 27, 2023
e323c83
generic: add OAuth refresh token support
mjcheetham Jan 27, 2023
6702935
oauth-ui: Add shared VMs and commands for OAuth
mjcheetham Jan 27, 2023
d59cd44
generic-ui: add Avalonia impl of OAuth and Device Code
mjcheetham Jan 27, 2023
241afed
generic-ui: add WPF impl of OAuth and device code
mjcheetham Jan 27, 2023
8d2ace5
oauth: provide UI prompts for generic OAuth auth
mjcheetham Jan 27, 2023
1aeb9fc
docs: add generic OAuth documentation
mjcheetham Jan 27, 2023
d8aa30b
generic: add OAuth test for generic provider
mjcheetham Jan 28, 2023
66b94e4
Add OAuth support to generic host provider (#1062)
mjcheetham Feb 1, 2023
7cee518
assembly: add assemblyutils
Nov 15, 2022
c2366f7
traceutils: add traceutils
Feb 7, 2023
4adb60e
trace2: add initial functionality
Feb 1, 2023
9642434
trace2: add collectorwriter
Feb 2, 2023
f6736ac
trace2: add streamwriter
Feb 7, 2023
1790779
trace2: add sid
Feb 2, 2023
8dca18b
trace2: detect event/normal formats
Feb 8, 2023
ddb7591
trace2: write version and start events
Feb 7, 2023
028ad46
trace2: write exit event
Feb 8, 2023
fb1942a
trace2: add infrastructure and initial events (#1045)
ldennington Feb 10, 2023
2041523
trace2: remove warning from tryparsesettings
ldennington Feb 14, 2023
4eb21ee
fix path
HolgerJeromin Feb 16, 2023
ce9f845
docs: fix path in docs/rename.md (#1115)
ldennington Feb 16, 2023
6b2459c
trace2: add exit event to UI helpers
ldennington Feb 16, 2023
2476614
trace2: add default thread name value of "main"
ldennington Feb 17, 2023
cf4b3e9
trace2: remove inaccurate warning and add UI helper exit calls (#1114)
ldennington Feb 21, 2023
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 .github/workflows/lint-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- uses: DavidAnson/markdownlint-cli2-action@d57f8bd57670b9c1deedf71219dd494614ff3335
- uses: DavidAnson/markdownlint-cli2-action@5b7c9f74fec47e6b15667b2cc23c63dff11e449e
with:
globs: |
"**/*.md"
Expand Down
43 changes: 35 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: tmp.linux-build
name: linux-build
path: |
linux-build

Expand All @@ -399,7 +399,11 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: tmp.linux-build
name: linux-build

- name: Remove symbols
run: |
rm tar/*symbols*

- uses: azure/login@v1
with:
Expand All @@ -423,6 +427,12 @@ jobs:
run: |
python .github/run_esrp_signing.py deb $env:LINUX_KEY_CODE $env:LINUX_OP_CODE
python .github/run_esrp_signing.py tar $env:LINUX_KEY_CODE $env:LINUX_OP_CODE

- name: Re-name tarball signature file
shell: bash
run: |
signaturepath=$(find signed/*.tar.gz)
mv "$signaturepath" "${signaturepath%.tar.gz}.asc"

- name: Upload signed tarball and Debian package
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -624,19 +634,27 @@ jobs:
- os: ubuntu-latest
artifact: linux-sign
command: git-credential-manager
description: debian
- os: ubuntu-latest
artifact: linux-build
command: git-credential-manager
description: tarball
- os: macos-latest
artifact: osx-x64-sign
command: git-credential-manager
description: osx-x64
- os: windows-latest
artifact: win-sign
# Even when a standalone GCM version is installed, GitHub actions
# runners still only recognize the version bundled with Git for
# Windows due to its placement on the PATH. For this reason, we use
# the full path to our installation to validate the Windows version.
command: "$PROGRAMFILES (x86)/Git Credential Manager/git-credential-manager.exe"
description: windows
- os: ubuntu-latest
artifact: dotnet-tool-sign
command: git-credential-manager
description: dotnet-tool
runs-on: ${{ matrix.component.os }}
needs: [ osx-sign, win-sign, linux-sign, dotnet-tool-sign ]
steps:
Expand All @@ -654,7 +672,7 @@ jobs:
name: ${{ matrix.component.artifact }}

- name: Install Windows
if: contains(matrix.component.os, 'windows')
if: contains(matrix.component.description, 'windows')
shell: pwsh
run: |
$exePaths = Get-ChildItem -Path ./signed/*.exe | %{$_.FullName}
Expand All @@ -663,22 +681,30 @@ jobs:
Start-Process -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART"
}

- name: Install Linux
if: contains(matrix.component.os, 'ubuntu') && contains(matrix.component.artifact, 'linux')
- name: Install Linux (Debian package)
if: contains(matrix.component.description, 'debian')
run: |
debpath=$(find ./*.deb)
sudo apt install $debpath
"${{ matrix.component.command }}" configure

- name: Install Linux (tarball)
if: contains(matrix.component.description, 'tarball')
run: |
# Ensure we find only the source tarball, not the symbols
tarpath=$(find ./tar -name '*[[:digit:]].tar.gz')
tar -xvf $tarpath -C /usr/local/bin
"${{ matrix.component.command }}" configure

- name: Install macOS
if: contains(matrix.component.os, 'macos')
if: contains(matrix.component.description, 'osx-x64')
run: |
# Only validate x64, given arm64 agents are not available
pkgpath=$(find ./*.pkg)
sudo installer -pkg $pkgpath -target /

- name: Install .NET tool
if: contains(matrix.component.os, 'ubuntu') && contains(matrix.component.artifact, 'dotnet-tool')
if: contains(matrix.component.description, 'dotnet-tool')
run: |
nupkgpath=$(find ./*.nupkg)
dotnet tool install -g --add-source $(dirname "$nupkgpath") git-credential-manager
Expand Down Expand Up @@ -787,6 +813,7 @@ jobs:
uploadDirectoryToRelease('osx-payload-and-symbols'),

// Upload Linux artifacts
uploadDirectoryToRelease('linux-build/tar'),
uploadDirectoryToRelease('linux-sign'),

// Upload .NET tool package
Expand All @@ -795,5 +822,5 @@ jobs:

- name: Publish .NET tool to nuget.org
run: |
dotnet nuget push dotnet-tool-sign/signed/*.nupkg \
dotnet nuget push dotnet-tool-sign/*.nupkg \
--api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
4 changes: 3 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The following are links to GCM user support documentation:
- [Host provider specification][gcm-host-provider]
- [Azure Repos OAuth tokens][gcm-azure-tokens]
- [GitLab support][gcm-gitlab]
- [Generic OAuth support][gcm-oauth]

[gcm-azure-tokens]: azrepos-users-and-tokens.md
[gcm-config]: configuration.md
Expand All @@ -23,4 +24,5 @@ The following are links to GCM user support documentation:
[gcm-gitlab]: gitlab.md
[gcm-host-provider]: hostprovider.md
[gcm-net-config]: netconfig.md
[gcm-usage]: usage.md
[gcm-oauth]: generic-oauth.md
[gcm-usage]: usage.md
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ _(unset)_|Windows: `wincredman`, macOS: `keychain`, Linux: _(none)_|-
`keychain`|macOS Keychain.|macOS
`secretservice`|[freedesktop.org Secret Service API][freedesktop-ss] via [libsecret][libsecret] (requires a graphical interface to unlock secret collections).|Linux
`gpg`|Use GPG to store encrypted files that are compatible with the [pass][pass] (requires GPG and `pass` to initialize the store).|macOS, Linux
`cache`|Git's built-in [credential cache][credential-cache].|Windows, macOS, Linux
`cache`|Git's built-in [credential cache][credential-cache].|macOS, Linux
`plaintext`|Store credentials in plaintext files (**UNSECURE**). Customize the plaintext store location with [`credential.plaintextStorePath`][credential-plaintextstorepath].|Windows, macOS, Linux

#### Example
Expand Down
116 changes: 116 additions & 0 deletions docs/generic-oauth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Generic Host Provider OAuth

Many Git hosts use the popular standard OAuth2 or OpenID Connect (OIDC)
authentication mechanisms to secure repositories they host.
Git Credential Manager supports any generic OAuth2-based Git host by simply
setting some configuration.

## Registering an OAuth application

In order to use GCM with a Git host that supports OAuth you must first have
registered an OAuth application with your host. The instructions on how to do
this can be found with your Git host provider's documentation.

When registering a new application, you should make sure to set an HTTP-based
redirect URL that points to `localhost`; for example:

```text
http://localhost
http://localhost:<port>
http://127.0.0.1
http://127.0.0.1:<port>
```

Note that you cannot use an HTTPS redirect URL. GCM does not require a specific
port number be used; if your Git host requires you to specify a port number in
the redirect URL then GCM will use that. Otherwise an available port will be
selected at the point authentication starts.

You must ensure that all scopes required to read and write to Git repositories
have been granted for the application or else credentials that are generated
will cause errors when pushing or fetching using Git.

As part of the registration process you should also be given a Client ID and,
optionally, a Client Secret. You will need both of these to configure GCM.

## Configure GCM

In order to configure GCM to use OAuth with your Git host you need to set the
following values in your Git configuration:

- Client ID
- Client Secret (optional)
- Redirect URL
- Scopes (optional)
- OAuth Endpoints
- Authorization Endpoint
- Token Endpoint
- Device Code Authorization Endpoint (optional)

OAuth endpoints can be found by consulting your Git host's OAuth app development
documentation. The URLs can be either absolute or relative to the host name;
for example: `https://example.com/oauth/authorize` or `/oauth/authorize`.

In order to set these values, you can run the following commands, where `<HOST>`
is the hostname of your Git host:

```shell
git config --global credential.<HOST>.oauthClientId <ClientID>
git config --global credential.<HOST>.oauthClientSecret <ClientSecret>
git config --global credential.<HOST>.oauthRedirectUri <RedirectURL>
git config --global credential.<HOST>.oauthAuthorizeEndpoint <AuthEndpoint>
git config --global credential.<HOST>.oauthTokenEndpoint <TokenEndpoint>
git config --global credential.<HOST>.oauthScopes <Scopes>
git config --global credential.<HOST>.oauthDeviceEndpoint <DeviceEndpoint>
```

**Example commands:**

- `git config --global credential.https://example.com.oauthClientId C33F2751FB76`

- `git config --global credential.https://example.com.oauthScopes "code:write profile:read"`

**Example Git configuration**

```ini
[credential "https://example.com"]
oauthClientId = 9d886e36-5771-4f2b-8c8b-420c68ad5baa
oauthClientSecret = 4BC5BD4704EAE28FD832
oauthRedirectUri = "http://127.0.0.1"
oauthAuthorizeEndpoint = "/login/oauth/authorize"
oauthTokenEndpoint = "/login/oauth/token"
oauthDeviceEndpoint = "/login/oauth/device"
oauthScopes = "code:write profile:read"
oauthDefaultUserName = "OAUTH"
oauthUseClientAuthHeader = false
```

### Additional configuration

Depending on the specific implementation of OAuth with your Git host you may
also need to specify additional behavior.

#### Token user name

If your Git host requires that you specify a username to use with OAuth tokens
you can either include the username in the Git remote URL, or specify a default
option via Git configuration.

Example Git remote with username: `https://[email protected]/repo.git`.
In order to use special characters you need to URL encode the values; for
example `@` becomes `%40`.

By default GCM uses the value `OAUTH-USER` unless specified in the remote URL,
or overriden using the `credential.<HOST>.oauthDefaultUserName` configuration.

#### Include client authentication in headers

If your Git host's OAuth implementation has specific requirements about whether
the client ID and secret should or should not be included in an `Authorization`
header during OAuth requests, you can control this using the following setting:

```shell
git config --global credential.<HOST>.oauthUseClientAuthHeader <true|false>
```

The default behavior is to include these values; i.e., `true`.
42 changes: 21 additions & 21 deletions docs/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

Git Credential Manager supports [gitlab.com][gitlab] out the box.

## Using on a another instance
## Using on another instance

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

1. [Create an OAuth application][gitlab-oauth]. 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. Set the 'write_repository' and
'read_repository' scopes.
_Unselect_ the 'Confidential' option. Set the 'read_repository' and
'write_repository' scopes.
1. Copy the application ID and configure
`git config --global credential.https://gitlab.example.com.GitLabDevClientId <APPLICATION_ID>`
`git config --global credential.https://gitlab.example.com.gitLabDevClientId <APPLICATION_ID>`
1. Copy the application secret and configure
`git config --global credential.https://gitlab.example.com.GitLabDevClientSecret
`git config --global credential.https://gitlab.example.com.gitLabDevClientSecret
<APPLICATION_SECRET>`
1. Configure authentication modes to include 'browser'
1. Optional if you want to force browser auth:
`git config --global credential.https://gitlab.example.com.gitLabAuthModes browser`
1. For good measure, configure
`git config --global credential.https://gitlab.example.com.provider gitlab`.
Expand All @@ -27,8 +27,8 @@ This may be necessary to recognise the domain as a GitLab instance.
### Clearing config

```console
git config --global --unset-all credential.https://gitlab.example.com.GitLabDevClientId
git config --global --unset-all credential.https://gitlab.example.com.GitLabDevClientSecret
git config --global --unset-all credential.https://gitlab.example.com.gitLabDevClientId
git config --global --unset-all credential.https://gitlab.example.com.gitLabDevClientSecret
git config --global --unset-all credential.https://gitlab.example.com.provider
```

Expand All @@ -39,23 +39,23 @@ instances, provided by community member [hickford](https://github.com/hickford/)

```console
# https://gitlab.freedesktop.org/
git config --global credential.https://gitlab.freedesktop.org.gitlabdevclientid 6503d8c5a27187628440d44e0352833a2b49bce540c546c22a3378c8f5b74d45
git config --global credential.https://gitlab.freedesktop.org.gitlabdevclientsecret 2ae9343a034ff1baadaef1e7ce3197776b00746a02ddf0323bb34aca8bff6dc1
git config --global credential.https://gitlab.freedesktop.org.gitLabDevClientId 6503d8c5a27187628440d44e0352833a2b49bce540c546c22a3378c8f5b74d45
git config --global credential.https://gitlab.freedesktop.org.gitLabDevClientSecret 2ae9343a034ff1baadaef1e7ce3197776b00746a02ddf0323bb34aca8bff6dc1
# https://gitlab.gnome.org/
git config --global credential.https://gitlab.gnome.org.gitlabdevclientid adf21361d32eddc87bf6baf8366f242dfe07a7d4335b46e8e101303364ccc470
git config --global credential.https://gitlab.gnome.org.gitlabdevclientsecret cdca4678f64e5b0be9febc0d5e7aab0d81d27696d7adb1cf8022ccefd0a58fc0
git config --global credential.https://gitlab.gnome.org.gitLabDevClientId adf21361d32eddc87bf6baf8366f242dfe07a7d4335b46e8e101303364ccc470
git config --global credential.https://gitlab.gnome.org.gitLabDevClientSecret cdca4678f64e5b0be9febc0d5e7aab0d81d27696d7adb1cf8022ccefd0a58fc0
# https://invent.kde.org/
git config --global credential.https://invent.kde.org.gitlabdevclientid cd7cb4342c7cd83d8c2fcc22c87320f88d0bde14984432ffca07ee24d0bf0699
git config --global credential.https://invent.kde.org.gitlabdevclientsecret 9cc8440b280c792ac429b3615ae1c8e0702e6b2479056f899d314f05afd94211
git config --global credential.https://invent.kde.org.gitLabDevClientId cd7cb4342c7cd83d8c2fcc22c87320f88d0bde14984432ffca07ee24d0bf0699
git config --global credential.https://invent.kde.org.gitLabDevClientSecret 9cc8440b280c792ac429b3615ae1c8e0702e6b2479056f899d314f05afd94211
# https://salsa.debian.org/
git config --global credential.https://salsa.debian.org.gitlabdevclientid 213f5fd32c6a14a0328048c0a77cc12c19138cc165ab957fb83d0add74656f89
git config --global credential.https://salsa.debian.org.gitlabdevclientsecret 3616b974b59451ecf553f951cb7b8e6e3c91c6d84dd3247dcb0183dac93c2a26
git config --global credential.https://salsa.debian.org.gitLabDevClientId 213f5fd32c6a14a0328048c0a77cc12c19138cc165ab957fb83d0add74656f89
git config --global credential.https://salsa.debian.org.gitLabDevClientSecret 3616b974b59451ecf553f951cb7b8e6e3c91c6d84dd3247dcb0183dac93c2a26
# https://gitlab.haskell.org/
git config --global credential.https://gitlab.haskell.org.gitlabdevclientid 57de5eaab72b3dc447fca8c19cea39527a08e82da5377c2d10a8ebb30b08fa5f
git config --global credential.https://gitlab.haskell.org.gitlabdevclientsecret 5170a480da8fb7341e0daac94223d4fff549c702efb2f8873d950bb2b88e434f
git config --global credential.https://gitlab.haskell.org.gitLabDevClientId 57de5eaab72b3dc447fca8c19cea39527a08e82da5377c2d10a8ebb30b08fa5f
git config --global credential.https://gitlab.haskell.org.gitLabDevClientSecret 5170a480da8fb7341e0daac94223d4fff549c702efb2f8873d950bb2b88e434f
# https://code.videolan.org/
git config --global credential.https://code.videolan.org.gitlabdevclientid f35c379241cc20bf9dffecb47990491b62757db4fb96080cddf2461eacb40375
git config --global credential.https://code.videolan.org.gitlabdevclientsecret 631558ec973c5ef65b78db9f41103f8247dc68d979c86f051c0fe4389e1995e8
git config --global credential.https://code.videolan.org.gitLabDevClientId f35c379241cc20bf9dffecb47990491b62757db4fb96080cddf2461eacb40375
git config --global credential.https://code.videolan.org.gitLabDevClientSecret 631558ec973c5ef65b78db9f41103f8247dc68d979c86f051c0fe4389e1995e8
```

See also [issue #677](https://github.com/GitCredentialManager/git-credential-manager/issues/677).
Expand All @@ -74,7 +74,7 @@ If you have a preferred authentication mode, you can specify
[credential.gitLabAuthModes][config-gitlab-auth-modes]:

```console
git config --global credential.gitlabauthmodes browser
git config --global credential.gitLabAuthModes browser
```

## Caveats
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sudo /usr/local/share/gcm-core/uninstall.sh

### .NET tool :star:

See the [.NET tool](#.NET-tool) section below for instructions on this
See the [.NET tool](#net-tool) section below for instructions on this
installation method.

---
Expand Down
4 changes: 2 additions & 2 deletions docs/rename.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
In November 2021, _"Git Credential Manager Core"_ was [renamed][rename-pr] to
simply _"Git Credential Manager"_, dropping the "Core" moniker. We announced the
new name in a [GitHub blog post][rename-blog], along with the new home for the
project in it's own [organization][gcm-org].
project in its own [organization][gcm-org].

![Git Credential Manager Core renamed](img/gcmcore-rename.png)

Expand Down Expand Up @@ -133,7 +133,7 @@ Look out for entries that include `git-credential-manager-core` or
or `manager` respectively.

> **Note:** When updating the Git configuration file in your home directory
> (`$HOME/.gitconfig` or `%USERPROFILE\.gitconfig%`) you should ensure there are
> (`$HOME/.gitconfig` or `%USERPROFILE%\.gitconfig`) you should ensure there are
> is an additional blank entry for `credential.helper` before the GCM entry.
>
> **Mac/Linux**
Expand Down
Loading