Skip to content

Commit f99d745

Browse files
authored
Cut new release for Git 2.40 rc0 (#1124)
GCM release for Git 2.40 release candidate 0.
2 parents 38fe0ef + cf4b3e9 commit f99d745

File tree

70 files changed

+2716
-166
lines changed

Some content is hidden

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

70 files changed

+2716
-166
lines changed

.github/workflows/lint-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
2222

23-
- uses: DavidAnson/markdownlint-cli2-action@d57f8bd57670b9c1deedf71219dd494614ff3335
23+
- uses: DavidAnson/markdownlint-cli2-action@5b7c9f74fec47e6b15667b2cc23c63dff11e449e
2424
with:
2525
globs: |
2626
"**/*.md"

.github/workflows/release.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ jobs:
384384
- name: Upload artifacts
385385
uses: actions/upload-artifact@v3
386386
with:
387-
name: tmp.linux-build
387+
name: linux-build
388388
path: |
389389
linux-build
390390
@@ -399,7 +399,11 @@ jobs:
399399
- name: Download artifacts
400400
uses: actions/download-artifact@v3
401401
with:
402-
name: tmp.linux-build
402+
name: linux-build
403+
404+
- name: Remove symbols
405+
run: |
406+
rm tar/*symbols*
403407
404408
- uses: azure/login@v1
405409
with:
@@ -423,6 +427,12 @@ jobs:
423427
run: |
424428
python .github/run_esrp_signing.py deb $env:LINUX_KEY_CODE $env:LINUX_OP_CODE
425429
python .github/run_esrp_signing.py tar $env:LINUX_KEY_CODE $env:LINUX_OP_CODE
430+
431+
- name: Re-name tarball signature file
432+
shell: bash
433+
run: |
434+
signaturepath=$(find signed/*.tar.gz)
435+
mv "$signaturepath" "${signaturepath%.tar.gz}.asc"
426436
427437
- name: Upload signed tarball and Debian package
428438
uses: actions/upload-artifact@v3
@@ -624,19 +634,27 @@ jobs:
624634
- os: ubuntu-latest
625635
artifact: linux-sign
626636
command: git-credential-manager
637+
description: debian
638+
- os: ubuntu-latest
639+
artifact: linux-build
640+
command: git-credential-manager
641+
description: tarball
627642
- os: macos-latest
628643
artifact: osx-x64-sign
629644
command: git-credential-manager
645+
description: osx-x64
630646
- os: windows-latest
631647
artifact: win-sign
632648
# Even when a standalone GCM version is installed, GitHub actions
633649
# runners still only recognize the version bundled with Git for
634650
# Windows due to its placement on the PATH. For this reason, we use
635651
# the full path to our installation to validate the Windows version.
636652
command: "$PROGRAMFILES (x86)/Git Credential Manager/git-credential-manager.exe"
653+
description: windows
637654
- os: ubuntu-latest
638655
artifact: dotnet-tool-sign
639656
command: git-credential-manager
657+
description: dotnet-tool
640658
runs-on: ${{ matrix.component.os }}
641659
needs: [ osx-sign, win-sign, linux-sign, dotnet-tool-sign ]
642660
steps:
@@ -654,7 +672,7 @@ jobs:
654672
name: ${{ matrix.component.artifact }}
655673

656674
- name: Install Windows
657-
if: contains(matrix.component.os, 'windows')
675+
if: contains(matrix.component.description, 'windows')
658676
shell: pwsh
659677
run: |
660678
$exePaths = Get-ChildItem -Path ./signed/*.exe | %{$_.FullName}
@@ -663,22 +681,30 @@ jobs:
663681
Start-Process -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART"
664682
}
665683
666-
- name: Install Linux
667-
if: contains(matrix.component.os, 'ubuntu') && contains(matrix.component.artifact, 'linux')
684+
- name: Install Linux (Debian package)
685+
if: contains(matrix.component.description, 'debian')
668686
run: |
669687
debpath=$(find ./*.deb)
670688
sudo apt install $debpath
671689
"${{ matrix.component.command }}" configure
690+
691+
- name: Install Linux (tarball)
692+
if: contains(matrix.component.description, 'tarball')
693+
run: |
694+
# Ensure we find only the source tarball, not the symbols
695+
tarpath=$(find ./tar -name '*[[:digit:]].tar.gz')
696+
tar -xvf $tarpath -C /usr/local/bin
697+
"${{ matrix.component.command }}" configure
672698
673699
- name: Install macOS
674-
if: contains(matrix.component.os, 'macos')
700+
if: contains(matrix.component.description, 'osx-x64')
675701
run: |
676702
# Only validate x64, given arm64 agents are not available
677703
pkgpath=$(find ./*.pkg)
678704
sudo installer -pkg $pkgpath -target /
679705
680706
- name: Install .NET tool
681-
if: contains(matrix.component.os, 'ubuntu') && contains(matrix.component.artifact, 'dotnet-tool')
707+
if: contains(matrix.component.description, 'dotnet-tool')
682708
run: |
683709
nupkgpath=$(find ./*.nupkg)
684710
dotnet tool install -g --add-source $(dirname "$nupkgpath") git-credential-manager
@@ -787,6 +813,7 @@ jobs:
787813
uploadDirectoryToRelease('osx-payload-and-symbols'),
788814
789815
// Upload Linux artifacts
816+
uploadDirectoryToRelease('linux-build/tar'),
790817
uploadDirectoryToRelease('linux-sign'),
791818
792819
// Upload .NET tool package
@@ -795,5 +822,5 @@ jobs:
795822
796823
- name: Publish .NET tool to nuget.org
797824
run: |
798-
dotnet nuget push dotnet-tool-sign/signed/*.nupkg \
825+
dotnet nuget push dotnet-tool-sign/*.nupkg \
799826
--api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

docs/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The following are links to GCM user support documentation:
1212
- [Host provider specification][gcm-host-provider]
1313
- [Azure Repos OAuth tokens][gcm-azure-tokens]
1414
- [GitLab support][gcm-gitlab]
15+
- [Generic OAuth support][gcm-oauth]
1516

1617
[gcm-azure-tokens]: azrepos-users-and-tokens.md
1718
[gcm-config]: configuration.md
@@ -23,4 +24,5 @@ The following are links to GCM user support documentation:
2324
[gcm-gitlab]: gitlab.md
2425
[gcm-host-provider]: hostprovider.md
2526
[gcm-net-config]: netconfig.md
26-
[gcm-usage]: usage.md
27+
[gcm-oauth]: generic-oauth.md
28+
[gcm-usage]: usage.md

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ _(unset)_|Windows: `wincredman`, macOS: `keychain`, Linux: _(none)_|-
442442
`keychain`|macOS Keychain.|macOS
443443
`secretservice`|[freedesktop.org Secret Service API][freedesktop-ss] via [libsecret][libsecret] (requires a graphical interface to unlock secret collections).|Linux
444444
`gpg`|Use GPG to store encrypted files that are compatible with the [pass][pass] (requires GPG and `pass` to initialize the store).|macOS, Linux
445-
`cache`|Git's built-in [credential cache][credential-cache].|Windows, macOS, Linux
445+
`cache`|Git's built-in [credential cache][credential-cache].|macOS, Linux
446446
`plaintext`|Store credentials in plaintext files (**UNSECURE**). Customize the plaintext store location with [`credential.plaintextStorePath`][credential-plaintextstorepath].|Windows, macOS, Linux
447447

448448
#### Example

docs/generic-oauth.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Generic Host Provider OAuth
2+
3+
Many Git hosts use the popular standard OAuth2 or OpenID Connect (OIDC)
4+
authentication mechanisms to secure repositories they host.
5+
Git Credential Manager supports any generic OAuth2-based Git host by simply
6+
setting some configuration.
7+
8+
## Registering an OAuth application
9+
10+
In order to use GCM with a Git host that supports OAuth you must first have
11+
registered an OAuth application with your host. The instructions on how to do
12+
this can be found with your Git host provider's documentation.
13+
14+
When registering a new application, you should make sure to set an HTTP-based
15+
redirect URL that points to `localhost`; for example:
16+
17+
```text
18+
http://localhost
19+
http://localhost:<port>
20+
http://127.0.0.1
21+
http://127.0.0.1:<port>
22+
```
23+
24+
Note that you cannot use an HTTPS redirect URL. GCM does not require a specific
25+
port number be used; if your Git host requires you to specify a port number in
26+
the redirect URL then GCM will use that. Otherwise an available port will be
27+
selected at the point authentication starts.
28+
29+
You must ensure that all scopes required to read and write to Git repositories
30+
have been granted for the application or else credentials that are generated
31+
will cause errors when pushing or fetching using Git.
32+
33+
As part of the registration process you should also be given a Client ID and,
34+
optionally, a Client Secret. You will need both of these to configure GCM.
35+
36+
## Configure GCM
37+
38+
In order to configure GCM to use OAuth with your Git host you need to set the
39+
following values in your Git configuration:
40+
41+
- Client ID
42+
- Client Secret (optional)
43+
- Redirect URL
44+
- Scopes (optional)
45+
- OAuth Endpoints
46+
- Authorization Endpoint
47+
- Token Endpoint
48+
- Device Code Authorization Endpoint (optional)
49+
50+
OAuth endpoints can be found by consulting your Git host's OAuth app development
51+
documentation. The URLs can be either absolute or relative to the host name;
52+
for example: `https://example.com/oauth/authorize` or `/oauth/authorize`.
53+
54+
In order to set these values, you can run the following commands, where `<HOST>`
55+
is the hostname of your Git host:
56+
57+
```shell
58+
git config --global credential.<HOST>.oauthClientId <ClientID>
59+
git config --global credential.<HOST>.oauthClientSecret <ClientSecret>
60+
git config --global credential.<HOST>.oauthRedirectUri <RedirectURL>
61+
git config --global credential.<HOST>.oauthAuthorizeEndpoint <AuthEndpoint>
62+
git config --global credential.<HOST>.oauthTokenEndpoint <TokenEndpoint>
63+
git config --global credential.<HOST>.oauthScopes <Scopes>
64+
git config --global credential.<HOST>.oauthDeviceEndpoint <DeviceEndpoint>
65+
```
66+
67+
**Example commands:**
68+
69+
- `git config --global credential.https://example.com.oauthClientId C33F2751FB76`
70+
71+
- `git config --global credential.https://example.com.oauthScopes "code:write profile:read"`
72+
73+
**Example Git configuration**
74+
75+
```ini
76+
[credential "https://example.com"]
77+
oauthClientId = 9d886e36-5771-4f2b-8c8b-420c68ad5baa
78+
oauthClientSecret = 4BC5BD4704EAE28FD832
79+
oauthRedirectUri = "http://127.0.0.1"
80+
oauthAuthorizeEndpoint = "/login/oauth/authorize"
81+
oauthTokenEndpoint = "/login/oauth/token"
82+
oauthDeviceEndpoint = "/login/oauth/device"
83+
oauthScopes = "code:write profile:read"
84+
oauthDefaultUserName = "OAUTH"
85+
oauthUseClientAuthHeader = false
86+
```
87+
88+
### Additional configuration
89+
90+
Depending on the specific implementation of OAuth with your Git host you may
91+
also need to specify additional behavior.
92+
93+
#### Token user name
94+
95+
If your Git host requires that you specify a username to use with OAuth tokens
96+
you can either include the username in the Git remote URL, or specify a default
97+
option via Git configuration.
98+
99+
Example Git remote with username: `https://[email protected]/repo.git`.
100+
In order to use special characters you need to URL encode the values; for
101+
example `@` becomes `%40`.
102+
103+
By default GCM uses the value `OAUTH-USER` unless specified in the remote URL,
104+
or overriden using the `credential.<HOST>.oauthDefaultUserName` configuration.
105+
106+
#### Include client authentication in headers
107+
108+
If your Git host's OAuth implementation has specific requirements about whether
109+
the client ID and secret should or should not be included in an `Authorization`
110+
header during OAuth requests, you can control this using the following setting:
111+
112+
```shell
113+
git config --global credential.<HOST>.oauthUseClientAuthHeader <true|false>
114+
```
115+
116+
The default behavior is to include these values; i.e., `true`.

docs/gitlab.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

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

5-
## Using on a another instance
5+
## Using on another instance
66

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

1010
1. [Create an OAuth application][gitlab-oauth]. This can be at the user, group
1111
or instance level. Specify a name and use a redirect URI of `http://127.0.0.1/`.
12-
_Unselect_ the 'Confidential' option. Set the 'write_repository' and
13-
'read_repository' scopes.
12+
_Unselect_ the 'Confidential' option. Set the 'read_repository' and
13+
'write_repository' scopes.
1414
1. Copy the application ID and configure
15-
`git config --global credential.https://gitlab.example.com.GitLabDevClientId <APPLICATION_ID>`
15+
`git config --global credential.https://gitlab.example.com.gitLabDevClientId <APPLICATION_ID>`
1616
1. Copy the application secret and configure
17-
`git config --global credential.https://gitlab.example.com.GitLabDevClientSecret
17+
`git config --global credential.https://gitlab.example.com.gitLabDevClientSecret
1818
<APPLICATION_SECRET>`
19-
1. Configure authentication modes to include 'browser'
19+
1. Optional if you want to force browser auth:
2020
`git config --global credential.https://gitlab.example.com.gitLabAuthModes browser`
2121
1. For good measure, configure
2222
`git config --global credential.https://gitlab.example.com.provider gitlab`.
@@ -27,8 +27,8 @@ This may be necessary to recognise the domain as a GitLab instance.
2727
### Clearing config
2828

2929
```console
30-
git config --global --unset-all credential.https://gitlab.example.com.GitLabDevClientId
31-
git config --global --unset-all credential.https://gitlab.example.com.GitLabDevClientSecret
30+
git config --global --unset-all credential.https://gitlab.example.com.gitLabDevClientId
31+
git config --global --unset-all credential.https://gitlab.example.com.gitLabDevClientSecret
3232
git config --global --unset-all credential.https://gitlab.example.com.provider
3333
```
3434

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

4040
```console
4141
# https://gitlab.freedesktop.org/
42-
git config --global credential.https://gitlab.freedesktop.org.gitlabdevclientid 6503d8c5a27187628440d44e0352833a2b49bce540c546c22a3378c8f5b74d45
43-
git config --global credential.https://gitlab.freedesktop.org.gitlabdevclientsecret 2ae9343a034ff1baadaef1e7ce3197776b00746a02ddf0323bb34aca8bff6dc1
42+
git config --global credential.https://gitlab.freedesktop.org.gitLabDevClientId 6503d8c5a27187628440d44e0352833a2b49bce540c546c22a3378c8f5b74d45
43+
git config --global credential.https://gitlab.freedesktop.org.gitLabDevClientSecret 2ae9343a034ff1baadaef1e7ce3197776b00746a02ddf0323bb34aca8bff6dc1
4444
# https://gitlab.gnome.org/
45-
git config --global credential.https://gitlab.gnome.org.gitlabdevclientid adf21361d32eddc87bf6baf8366f242dfe07a7d4335b46e8e101303364ccc470
46-
git config --global credential.https://gitlab.gnome.org.gitlabdevclientsecret cdca4678f64e5b0be9febc0d5e7aab0d81d27696d7adb1cf8022ccefd0a58fc0
45+
git config --global credential.https://gitlab.gnome.org.gitLabDevClientId adf21361d32eddc87bf6baf8366f242dfe07a7d4335b46e8e101303364ccc470
46+
git config --global credential.https://gitlab.gnome.org.gitLabDevClientSecret cdca4678f64e5b0be9febc0d5e7aab0d81d27696d7adb1cf8022ccefd0a58fc0
4747
# https://invent.kde.org/
48-
git config --global credential.https://invent.kde.org.gitlabdevclientid cd7cb4342c7cd83d8c2fcc22c87320f88d0bde14984432ffca07ee24d0bf0699
49-
git config --global credential.https://invent.kde.org.gitlabdevclientsecret 9cc8440b280c792ac429b3615ae1c8e0702e6b2479056f899d314f05afd94211
48+
git config --global credential.https://invent.kde.org.gitLabDevClientId cd7cb4342c7cd83d8c2fcc22c87320f88d0bde14984432ffca07ee24d0bf0699
49+
git config --global credential.https://invent.kde.org.gitLabDevClientSecret 9cc8440b280c792ac429b3615ae1c8e0702e6b2479056f899d314f05afd94211
5050
# https://salsa.debian.org/
51-
git config --global credential.https://salsa.debian.org.gitlabdevclientid 213f5fd32c6a14a0328048c0a77cc12c19138cc165ab957fb83d0add74656f89
52-
git config --global credential.https://salsa.debian.org.gitlabdevclientsecret 3616b974b59451ecf553f951cb7b8e6e3c91c6d84dd3247dcb0183dac93c2a26
51+
git config --global credential.https://salsa.debian.org.gitLabDevClientId 213f5fd32c6a14a0328048c0a77cc12c19138cc165ab957fb83d0add74656f89
52+
git config --global credential.https://salsa.debian.org.gitLabDevClientSecret 3616b974b59451ecf553f951cb7b8e6e3c91c6d84dd3247dcb0183dac93c2a26
5353
# https://gitlab.haskell.org/
54-
git config --global credential.https://gitlab.haskell.org.gitlabdevclientid 57de5eaab72b3dc447fca8c19cea39527a08e82da5377c2d10a8ebb30b08fa5f
55-
git config --global credential.https://gitlab.haskell.org.gitlabdevclientsecret 5170a480da8fb7341e0daac94223d4fff549c702efb2f8873d950bb2b88e434f
54+
git config --global credential.https://gitlab.haskell.org.gitLabDevClientId 57de5eaab72b3dc447fca8c19cea39527a08e82da5377c2d10a8ebb30b08fa5f
55+
git config --global credential.https://gitlab.haskell.org.gitLabDevClientSecret 5170a480da8fb7341e0daac94223d4fff549c702efb2f8873d950bb2b88e434f
5656
# https://code.videolan.org/
57-
git config --global credential.https://code.videolan.org.gitlabdevclientid f35c379241cc20bf9dffecb47990491b62757db4fb96080cddf2461eacb40375
58-
git config --global credential.https://code.videolan.org.gitlabdevclientsecret 631558ec973c5ef65b78db9f41103f8247dc68d979c86f051c0fe4389e1995e8
57+
git config --global credential.https://code.videolan.org.gitLabDevClientId f35c379241cc20bf9dffecb47990491b62757db4fb96080cddf2461eacb40375
58+
git config --global credential.https://code.videolan.org.gitLabDevClientSecret 631558ec973c5ef65b78db9f41103f8247dc68d979c86f051c0fe4389e1995e8
5959
```
6060

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

7676
```console
77-
git config --global credential.gitlabauthmodes browser
77+
git config --global credential.gitLabAuthModes browser
7878
```
7979

8080
## Caveats

docs/rename.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
In November 2021, _"Git Credential Manager Core"_ was [renamed][rename-pr] to
44
simply _"Git Credential Manager"_, dropping the "Core" moniker. We announced the
55
new name in a [GitHub blog post][rename-blog], along with the new home for the
6-
project in it's own [organization][gcm-org].
6+
project in its own [organization][gcm-org].
77

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

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

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

src/linux/Packaging.Linux/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ fi
4444

4545
OUTDIR="$INSTALLER_OUT/$CONFIGURATION"
4646
PAYLOAD="$OUTDIR/payload"
47+
SYMBOLS="$OUTDIR/payload.sym"
4748

4849
# Lay out payload
4950
"$INSTALLER_SRC/layout.sh" --configuration="$CONFIGURATION" || exit 1
@@ -78,7 +79,7 @@ if [ $INSTALL_FROM_SOURCE = true ]; then
7879
echo "Install complete."
7980
else
8081
# Pack
81-
"$INSTALLER_SRC/pack.sh" --configuration="$CONFIGURATION" --payload="$PAYLOAD" --version="$VERSION" || exit 1
82+
"$INSTALLER_SRC/pack.sh" --configuration="$CONFIGURATION" --payload="$PAYLOAD" --symbols="$SYMBOLS" --version="$VERSION" || exit 1
8283
fi
8384

8485
echo "Build of Packaging.Linux complete."

0 commit comments

Comments
 (0)