Skip to content

Commit e1c2b45

Browse files
authored
Merge pull request #530 from microsoft/main
New release
2 parents 3047faf + 0b2cdef commit e1c2b45

File tree

331 files changed

+1071
-849
lines changed

Some content is hidden

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

331 files changed

+1071
-849
lines changed

.github/ISSUE_TEMPLATE/auth-problem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assignees: ''
88

99
**Which version of GCM Core are you using?**
1010

11-
From a terminal, run `git-credential-manager-core --version` and paste the output.
11+
From a terminal, run `git credential-manager-core --version` and paste the output.
1212

1313
<!-- Ex:
1414
Git Credential Manager version 2.0.8-beta+e1f8492d04 (macOS, .NET Core 4.6.27129.04)

.github/workflows/release-apt-get.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

.github/workflows/release-winget.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
99

10-
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md).
10+
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
1111

1212
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
1313

@@ -24,6 +24,11 @@ This helps us coordinate and reduce duplication.
2424
0. Make sure the tests pass on your machine: `dotnet test`
2525
0. Create a new branch: `git switch -c my-branch-name`
2626
0. Make your change, add tests, and make sure the tests still pass
27+
0. For UI updates, test your changes by executing a `dotnet run` in applicable UI-related project directories:
28+
- `Atlassian.Bitbucket.UI.Avalonia`
29+
- `GitHub.UI.Avalonia`
30+
- `Atlassian.Bitbucket.UI.Windows`
31+
- `GitHub.UI.Windows`
2732
0. Push to your fork and [submit a pull request][pr]
2833
0. Pat your self on the back and wait for your pull request to be reviewed and merged.
2934

Git-Credential-Manager.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A7FC1234-95E
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Git-Credential-Manager", "src\shared\Git-Credential-Manager\Git-Credential-Manager.csproj", "{28F06D44-AB25-4CF5-93F9-978C23FAA9D6}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Git.CredentialManager", "src\shared\Microsoft.Git.CredentialManager\Microsoft.Git.CredentialManager.csproj", "{31BCFC70-B767-4274-873F-1A076D422FC3}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core", "src\shared\Core\Core.csproj", "{31BCFC70-B767-4274-873F-1A076D422FC3}"
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Git.CredentialManager.Tests", "src\shared\Microsoft.Git.CredentialManager.Tests\Microsoft.Git.CredentialManager.Tests.csproj", "{AD41FA1E-51F5-4E4F-B7DA-32F921491313}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Tests", "src\shared\Core.Tests\Core.Tests.csproj", "{AD41FA1E-51F5-4E4F-B7DA-32F921491313}"
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureRepos", "src\shared\Microsoft.AzureRepos\Microsoft.AzureRepos.csproj", "{714AF9EB-44E6-4058-BD3E-9039F29F4D7A}"
1515
EndProject
@@ -37,7 +37,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlassian.Bitbucket", "src\
3737
EndProject
3838
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlassian.Bitbucket.Tests", "src\shared\Atlassian.Bitbucket.Tests\Atlassian.Bitbucket.Tests.csproj", "{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}"
3939
EndProject
40-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.UI.Windows", "src\windows\Shared.UI.Windows\Shared.UI.Windows.csproj", "{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}"
40+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.UI.Windows", "src\windows\Core.UI.Windows\Core.UI.Windows.csproj", "{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}"
4141
EndProject
4242
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Packaging.Linux", "src\linux\Packaging.Linux\Packaging.Linux.csproj", "{AD2A935F-3720-4802-8119-6A9B35B254DF}"
4343
EndProject
@@ -47,9 +47,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.UI", "src\shared\Git
4747
EndProject
4848
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlassian.Bitbucket.UI", "src\shared\Atlassian.Bitbucket.UI\Atlassian.Bitbucket.UI.csproj", "{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}"
4949
EndProject
50-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Git.CredentialManager.UI", "src\shared\Microsoft.Git.CredentialManager.UI\Microsoft.Git.CredentialManager.UI.csproj", "{001846B0-462B-4A27-90CD-2435D4C0F680}"
50+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.UI", "src\shared\Core.UI\Core.UI.csproj", "{001846B0-462B-4A27-90CD-2435D4C0F680}"
5151
EndProject
52-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Git.CredentialManager.UI.Avalonia", "src\shared\Microsoft.Git.CredentialManager.UI.Avalonia\Microsoft.Git.CredentialManager.UI.Avalonia.csproj", "{DE620324-250C-4262-BA13-198FA6FDB82A}"
52+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.UI.Avalonia", "src\shared\Core.UI.Avalonia\Core.UI.Avalonia.csproj", "{DE620324-250C-4262-BA13-198FA6FDB82A}"
5353
EndProject
5454
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.UI.Avalonia", "src\shared\GitHub.UI.Avalonia\GitHub.UI.Avalonia.csproj", "{459501A8-31E6-41CB-BE54-D31FFF4B2007}"
5555
EndProject

README.md

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ Proxy support|&#10003;|&#10003;|&#10003;
3535

3636
**Notes:**
3737

38-
(\*) Debian package offered but not yet available on an official Microsoft feed.
39-
Fedora packages planned but not yet available.
38+
(\*) Fedora packages planned but not yet available.
4039

4140
## Download and Install
4241

@@ -89,33 +88,7 @@ sudo /usr/local/share/gcm-core/uninstall.sh
8988
<a name="linux-install-instructions"></a>
9089
### Linux
9190

92-
#### Debian package (.deb)
93-
94-
`apt-get` support is available for Ubuntu Bionic Beaver (18.04) and Hirsute
95-
Hippo (21.04). Take the following steps to set up and install based on the
96-
version you are running:
97-
98-
##### Ubuntu 18.04 (Bionic)
99-
100-
```shell
101-
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
102-
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
103-
sudo apt-get update
104-
sudo apt-get install gcmcore
105-
git-credential-manager-core configure
106-
```
107-
108-
##### Ubuntu 21.04 (Hirsute)
109-
110-
```shell
111-
curl -sSL https://packages.microsoft.com/config/ubuntu/21.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list
112-
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
113-
sudo apt-get update
114-
sudo apt-get install gcmcore
115-
git-credential-manager-core configure
116-
```
117-
118-
##### Other Ubuntu/Debian distributions
91+
#### Ubuntu/Debian distributions
11992

12093
Download the latest [.deb package](https://github.com/microsoft/Git-Credential-Manager-Core/releases/latest), and run the following:
12194

@@ -139,7 +112,13 @@ git-credential-manager-core configure
139112

140113
### Windows
141114

142-
You can download the [latest installer](https://github.com/microsoft/Git-Credential-Manager-Core/releases/latest) for Windows to install GCM Core standalone.
115+
GCM Core is included with [Git for Windows](https://gitforwindows.org/), and the latest version is included in each new Git for Windows release. This is the preferred way to install GCM Core on Windows. During installation you will be asked to select a credential helper, with GCM Core being set as the default.
116+
117+
![image](https://user-images.githubusercontent.com/5658207/140082529-1ac133c1-0922-4a24-af03-067e27b3988b.png)
118+
119+
#### Standalone installation
120+
121+
You can also download the [latest installer](https://github.com/microsoft/Git-Credential-Manager-Core/releases/latest) for Windows to install GCM Core standalone.
143122

144123
**:warning: Important :warning:**
145124

@@ -173,6 +152,22 @@ repositories from inside of WSL.
173152

174153
[Please see the GCM Core on WSL docs](docs/wsl.md) for more information.
175154

155+
## Supported Git versions
156+
157+
Git Credential Manager Core tries to be compatible with the broadest set of Git
158+
versions (within reason). However there are some know problematic releases of
159+
Git that are not compatible.
160+
161+
- Git 1.x
162+
163+
The initial major version of Git is not supported or tested with GCM.
164+
165+
- Git 2.26.2
166+
167+
This version of Git introduced a breaking change with parsing credential
168+
configuration that GCM relies on. This issue was fixed in commit [`12294990`](https://github.com/git/git/commit/12294990c90e043862be9eb7eb22c3784b526340)
169+
of the Git project, and released in Git 2.27.0.
170+
176171
## How to use
177172

178173
Once it's installed and configured, Git Credential Manager Core is called implicitly by Git.

docs/architecture.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
| | | | | |
3232
+-v---v----v--------------v------------+ +-v-----------------v----------------+
3333
| | | |
34-
| Microsoft.Git.CredentialManager <--+ Microsoft.Git.CredentialManager.UI |
34+
| Core <--+ Core.UI |
3535
| | | |
3636
+--------------------------------------+ +------------------------------------+
3737
```
3838

3939
Git Credential Manager Core (GCM Core) is built to be Git host and platform/OS
4040
agonstic. Most of the shared logic (command execution, the abstract platform
41-
subsystems, etc) can be found in the `Microsoft.Git.CredentialManager` class
41+
subsystems, etc) can be found in the `Core` class
4242
library (C#). The library targets .NET Standard as well as .NET Framework.
4343

4444
> **Note**
@@ -59,10 +59,10 @@ The entry-point for GCM Core can be found in the `Git-Credential-Manager`
5959
project, a console application that targets both .NET and .NET Framework.
6060
This project emits the `git-credential-manager-core(.exe)` executable, and
6161
contains very little code - registration of all supported host providers and
62-
running the `Application` object found in `Microsoft.Git.CredentialManager`.
62+
running the `Application` object found in `Core`.
6363

6464
Providers have their own projects/assemblies that take dependencies on the
65-
`Microsoft.Git.CredentialManager` core assembly, and are dependents of the main
65+
`Core` core assembly, and are dependents of the main
6666
entry point application `Git-Credential-Manager`. Code in these binaries is
6767
expected to run on all supported platforms and typically (see MSAL.NET note
6868
above) does not include any graphical user interface; they use terminal prompts
@@ -88,7 +88,7 @@ issue for up-to-date progress on this effort.
8888

8989
For authentication using Microsoft Accounts or Azure Active Directory, things
9090
are a little different. The `MicrosoftAuthentication` component is present in
91-
the core `Microsoft.Git.CredentialManager` assembly, rather than bundled with a
91+
the core `Core` assembly, rather than bundled with a
9292
specific host provider. This was done to allow any service that may wish to in
9393
the future integrate with Microsoft Accounts or Azure Active Directory can make
9494
use of this reusable authentication component.
@@ -148,7 +148,7 @@ Git Credential Manager Core maintains a set of known commands including
148148
GCM Core also maintains a set of known, registered host providers that implement
149149
the `IHostProvider` interface. Providers register themselves by adding an
150150
instance of the provider to the `Application` object via the `RegisterProvider`
151-
method [in `Microsoft.Git.CredentialManager.Program`](../src/shared/Git-Credential-Manager/Program.cs).
151+
method [in `Core.Program`](../src/shared/Git-Credential-Manager/Program.cs).
152152
The `GenericHostProvider` is registered last so that it can handle all other
153153
HTTP-based remotes as a catch-all, and provide basic username/password auth and
154154
detect the presence of Windows Integrated Authentication (Kerberos, NTLM,

docs/autodetect.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ hostname can be made. Only one HTTP `HEAD` call is made per credential request
3131
received by Git. To avoid this network call, please [explicitly configure](#explicit-configuration)
3232
the host provider for your self-hosted instance.
3333

34+
After a successful detection of the host provider, GCM will automatically set
35+
the [`credential.provider` configuration entry](configuration.md#credentialprovider)
36+
for that remote to avoid needing to perform this expensive network call in
37+
future requests.
38+
3439
### Timeout
3540

3641
You can control how long GCM will wait for a response to the remote network call
@@ -41,7 +46,7 @@ Git configuration setting to the maximum number of milliseconds to wait.
4146
The default value is 2000 milliseconds (2 seconds). You can prevent the network
4247
call altogether by setting a zero or negative value, for example -1.
4348

44-
## Explicit configuration
49+
## Manual configuration
4550

4651
If the auto-detection mechanism fails to select the correct host provider, or
4752
if the remote probing network call is causing performance issues, you can

docs/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ _(unset)_|Automatically detect modes
209209
`oauth`|Expands to: `browser, device`
210210
`browser`|OAuth authentication via a web browser _(requires a GUI)_
211211
`device`|OAuth authentication with a device code
212-
`basic`|Basic/PAT-based authentication
212+
`basic`|Basic authentication using username and password
213+
`pat`|Personal Access Token (pat)-based authentication
213214

214215
#### Example
215216

@@ -394,7 +395,7 @@ Value|Git Behavior
394395
On Windows using GitHub, for a user whose login is `alice`, and with `credential.useHttpPath` set to `false` (or not set), the following remote URLs will use the same credentials:
395396

396397
```text
397-
Credential: "git:https://github.com" (user = alice)
398+
Credential: "git:https://github.com" (user = alice)
398399
399400
https://github.com/foo/bar
400401
https://github.com/contoso/widgets

docs/credstores.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
There are several options for storing credentials that GCM Core supports:
44

55
- Windows Credential Manager
6+
- DPAPI protected files
67
- macOS Keychain
78
- [freedesktop.org Secret Service API](https://specifications.freedesktop.org/secret-service/)
89
- GPG/[`pass`](https://www.passwordstore.org/) compatible files

0 commit comments

Comments
 (0)