Skip to content

Commit 64608ef

Browse files
authored
Merge pull request #78 from microsoft/master
Prepare release with proxy support, Windows preview, inproc MS Auth
2 parents 54521cc + 21751ca commit 64608ef

File tree

117 files changed

+7396
-1198
lines changed

Some content is hidden

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

117 files changed

+7396
-1198
lines changed

.azure-pipelines/templates/windows/compile.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ steps:
3131
configuration: 'Windows$(configuration)'
3232
otherConsoleOptions: '/Framework:.NETCoreApp,Version=2.1'
3333
testRunTitle: 'Unit tests - common (Windows)'
34-
continueOnError: true
3534

3635
- task: VSTest@2
3736
displayName: Run helpers unit tests

.azure-pipelines/templates/windows/pack.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
steps:
22
- script: |
3-
xcopy "out\windows\Installer.Windows\bin\$(configuration)\net461" "$(Build.StagingDirectory)\publish\"
4-
xcopy "out\windows\Payload.Windows\bin\$(configuration)\net461" "$(Build.StagingDirectory)\publish\payload\"
3+
xcopy "out\windows\Installer.Windows\bin\$(configuration)\net461" "$(Build.StagingDirectory)\publish\"
4+
xcopy "out\windows\Payload.Windows\bin\$(configuration)\net461\win-x64" "$(Build.StagingDirectory)\publish\payload\"
55
mkdir "$(Build.StagingDirectory)\publish\payload.sym\"
6-
move "$(Build.StagingDirectory)\publish\payload\*.pdb" "$(Build.StagingDirectory)\publish\payload.sym\"
6+
move "$(Build.StagingDirectory)\publish\payload\*.pdb" "$(Build.StagingDirectory)\publish\payload.sym\"
77
displayName: Prepare final build artifact
88
99
- task: PublishPipelineArtifact@0

.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 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)

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/netcoreapp2.1/git-credential-manager.dll",
13+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/netcoreapp2.1/git-credential-manager-core.dll",
1414
"args": ["get"],
1515
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
1616
"console": "integratedTerminal",

Git-Credential-Manager.sln

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestInfrastructure", "src\s
2121
EndProject
2222
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub", "src\shared\GitHub\GitHub.csproj", "{3C840B06-A595-4FD9-9A76-56CD45B14780}"
2323
EndProject
24-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Authentication.Helper.Windows", "src\windows\Microsoft.Authentication.Helper.Windows\Microsoft.Authentication.Helper.Windows.csproj", "{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}"
25-
EndProject
26-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Authentication.Helper.Windows.Tests", "src\windows\Microsoft.Authentication.Helper.Windows.Tests\Microsoft.Authentication.Helper.Windows.Tests.csproj", "{E0391B02-16D5-4B49-9C33-349B25717011}"
27-
EndProject
2824
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{D5277A0E-997E-453A-8CB9-4EFCC8B16A29}"
2925
EndProject
3026
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Tests", "src\shared\GitHub.Tests\GitHub.Tests.csproj", "{3E524EA8-D31A-4394-997C-14B522E3D6FD}"
@@ -55,6 +51,17 @@ ProjectSection(SolutionItems) = preProject
5551
assets\gcmweb.png = assets\gcmweb.png
5652
EndProjectSection
5753
EndProject
54+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{83BD5957-AC75-4072-A3D1-ABF3A71951F5}"
55+
ProjectSection(SolutionItems) = preProject
56+
docs\configuration.md = docs\configuration.md
57+
docs\development.md = docs\development.md
58+
docs\environment.md = docs\environment.md
59+
docs\faq.md = docs\faq.md
60+
docs\migration.md = docs\migration.md
61+
docs\usage.md = docs\usage.md
62+
docs\netconfig.md = docs\netconfig.md
63+
EndProjectSection
64+
EndProject
5865
Global
5966
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6067
Debug|Any CPU = Debug|Any CPU
@@ -149,22 +156,6 @@ Global
149156
{3C840B06-A595-4FD9-9A76-56CD45B14780}.MacDebug|Any CPU.Build.0 = Debug|Any CPU
150157
{3C840B06-A595-4FD9-9A76-56CD45B14780}.MacRelease|Any CPU.ActiveCfg = Release|Any CPU
151158
{3C840B06-A595-4FD9-9A76-56CD45B14780}.MacRelease|Any CPU.Build.0 = Release|Any CPU
152-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
153-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}.Release|Any CPU.ActiveCfg = Release|Any CPU
154-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
155-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
156-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
157-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
158-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
159-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4}.MacRelease|Any CPU.ActiveCfg = Release|Any CPU
160-
{E0391B02-16D5-4B49-9C33-349B25717011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
161-
{E0391B02-16D5-4B49-9C33-349B25717011}.Release|Any CPU.ActiveCfg = Release|Any CPU
162-
{E0391B02-16D5-4B49-9C33-349B25717011}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
163-
{E0391B02-16D5-4B49-9C33-349B25717011}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
164-
{E0391B02-16D5-4B49-9C33-349B25717011}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
165-
{E0391B02-16D5-4B49-9C33-349B25717011}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
166-
{E0391B02-16D5-4B49-9C33-349B25717011}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
167-
{E0391B02-16D5-4B49-9C33-349B25717011}.MacRelease|Any CPU.ActiveCfg = Release|Any CPU
168159
{3E524EA8-D31A-4394-997C-14B522E3D6FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
169160
{3E524EA8-D31A-4394-997C-14B522E3D6FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
170161
{3E524EA8-D31A-4394-997C-14B522E3D6FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -231,7 +222,6 @@ Global
231222
EndGlobalSection
232223
GlobalSection(NestedProjects) = preSolution
233224
{66722747-1B61-40E4-A89B-1AC8E6D62EA9} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
234-
{8B984F78-4EAF-4BC0-A34E-BA3949700ED4} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
235225
{D5277A0E-997E-453A-8CB9-4EFCC8B16A29} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
236226
{28F06D44-AB25-4CF5-93F9-978C23FAA9D6} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
237227
{3C840B06-A595-4FD9-9A76-56CD45B14780} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
@@ -240,7 +230,6 @@ Global
240230
{97DC6241-1240-4A85-8035-F8404A983A82} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
241231
{AD41FA1E-51F5-4E4F-B7DA-32F921491313} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
242232
{5A7D9E8B-C1D2-4C5C-BE98-648C41D1F8BD} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
243-
{E0391B02-16D5-4B49-9C33-349B25717011} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
244233
{3E524EA8-D31A-4394-997C-14B522E3D6FD} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
245234
{3D279E2D-E011-45CF-8EA8-3D71D1300443} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
246235
{206430B1-CEED-4C84-8D49-D0A399632202} = {3D279E2D-E011-45CF-8EA8-3D71D1300443}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ To use GCM Core, you can download the [latest installer](https://github.com/Micr
4646

4747
### Git Credential Manager for Mac and Linux (Java-based GCM)
4848

49-
If you have an existing installation of the 'Java GCM' on macOS and you have installed this using Homebrew, this installation will be unlinked (`brew unlink git-credential-manager`) when GCM Core is installed. Additionally any symlinks or files previously located at `/usr/local/bin/git-credential-manager` will be replaced with a GCM Core symlink.
49+
If you have an existing installation of the 'Java GCM' on macOS and you have installed this using Homebrew, this installation will be unlinked (`brew unlink git-credential-manager`) when GCM Core is installed.
5050

5151
## How to use
5252

docs/configuration.md

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,91 @@ For the complete list of settings GCM Core understands, see the list below.
2222

2323
## Available settings
2424

25-
_Currently there are no available settings. This is a placeholder for the settings on the backlog._
25+
### credential.provider
26+
27+
Define the host provider to use when authenticating.
28+
29+
ID|Provider
30+
-|-
31+
`auto` _(default)_|_\[automatic\]_
32+
`azure-repos`|Azure Repos
33+
`github`|GitHub
34+
`generic`|Generic (any other provider not listed above)
35+
36+
Automatic provider selection is based on the remote URL.
37+
38+
This setting is typically used with a scoped URL to map a particular set of remote URLs to providers, for example to mark a host as a GitHub Enterprise instance.
39+
40+
#### Example
41+
42+
```shell
43+
git config --global credential.ghe.contoso.com.provider github
44+
```
45+
46+
**Also see: [GCM_PROVIDER](environment.md#GCM_PROVIDER)**
47+
48+
---
49+
50+
### credential.authority _(deprecated)_
51+
52+
> This setting is deprecated and should be replaced by `credential.provider` with the corresponding provider ID value.
53+
>
54+
> Click [here](https://aka.ms/gcmcore-authority) for more information.
55+
56+
Select the host provider to use when authenticating by which authority is supported by the providers.
57+
58+
Authority|Provider(s)
59+
-|-
60+
`auto` _(default)_|_\[automatic\]_
61+
`msa`, `microsoft`, `microsoftaccount`,<br/>`aad`, `azure`, `azuredirectory`,</br>`live`, `liveconnect`, `liveid`|Azure Repos<br/>_(supports Microsoft Authentication)_
62+
`github`|GitHub<br/>_(supports GitHub Authentication)_
63+
`basic`, `integrated`, `windows`, `kerberos`, `ntlm`,<br/>`tfs`, `sso`|Generic<br/>_(supports Basic and Windows Integrated Authentication)_
64+
65+
#### Example
66+
67+
```shell
68+
git config --global credential.ghe.contoso.com.authority github
69+
```
70+
71+
**Also see: [GCM_AUTHORITY](environment.md#GCM_AUTHORITY-deprecated)**
72+
73+
---
74+
75+
### credential.allowWindowsAuth
76+
77+
Allow detection of Windows Integrated Authentication (WIA) support for generic host providers. Setting this value to `false` will prevent the use of WIA and force a basic authentication prompt when using the Generic host provider.
78+
79+
**Note:** WIA is only supported on Windows.
80+
81+
**Note:** WIA is an umbrella term for NTLM and Kerberos (and Negotiate).
82+
83+
Value|WIA detection
84+
-|-
85+
`true` _(default)_|Permitted
86+
`false`|Not permitted
87+
88+
#### Example
89+
90+
```shell
91+
git config --global credential.tfsonprem123.allowWindowsAuth false
92+
```
93+
94+
**Also see: [GCM_ALLOW_WINDOWSAUTH](environment.md#GCM_ALLOW_WINDOWSAUTH)**
95+
96+
---
97+
98+
### credential.httpProxy _(deprecated)_
99+
100+
> This setting is deprecated and should be replaced by the [standard `http.proxy` Git configuration option](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpproxy).
101+
>
102+
> Click [here](https://aka.ms/gcmcore-httpproxy) for more information.
103+
104+
Configure GCM Core to use the a proxy for network operations.
105+
106+
**Note:** Git itself does _not_ respect this setting; this affects GCM _only_.
107+
108+
```shell
109+
git config --global credential.httpsProxy http://john.doe:[email protected]
110+
```
111+
112+
**Also see: [GCM_HTTP_PROXY](environment.md#GCM_HTTP_PROXY-deprecated)**

docs/environment.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Defaults to tracing disabled.
3737

3838
_No configuration equivalent._
3939

40+
---
41+
4042
### GCM_TRACE_SECRETS
4143

4244
Enables tracing of secret and senstive information, which is by default masked in trace output.
@@ -64,6 +66,8 @@ Defaults to disabled.
6466

6567
_No configuration equivalent._
6668

69+
---
70+
6771
### GCM_TRACE_MSAUTH
6872

6973
Enables inclusion of Microsoft Authentication libraries (ADAL, MSAL) logs in GCM trace output.
@@ -91,6 +95,8 @@ Defaults to disabled.
9195

9296
_No configuration equivalent._
9397

98+
---
99+
94100
### GCM_DEBUG
95101

96102
Pauses execution of GCM Core at launch to wait for a debugger to be attached.
@@ -112,3 +118,126 @@ export GCM_DEBUG=1
112118
Defaults to disabled.
113119

114120
_No configuration equivalent._
121+
122+
---
123+
124+
### GCM_PROVIDER
125+
126+
Define the host provider to use when authenticating.
127+
128+
ID|Provider
129+
-|-
130+
`auto` _(default)_|_\[automatic\]_
131+
`azure-repos`|Azure Repos
132+
`github`|GitHub
133+
`generic`|Generic (any other provider not listed above)
134+
135+
Automatic provider selection is based on the remote URL.
136+
137+
This setting is typically used with a scoped URL to map a particular set of remote URLs to providers, for example to mark a host as a GitHub Enterprise instance.
138+
139+
#### Example
140+
141+
##### Windows
142+
143+
```batch
144+
SET GCM_PROVIDER=github
145+
```
146+
147+
##### macOS/Linux
148+
149+
```bash
150+
export GCM_PROVIDER=github
151+
```
152+
153+
**Also see: [credential.provider](configuration.md#credentialprovider)**
154+
155+
---
156+
157+
### GCM_AUTHORITY _(deprecated)_
158+
159+
> This setting is deprecated and should be replaced by `GCM_PROVIDER` with the corresponding provider ID value.
160+
>
161+
> Click [here](https://aka.ms/gcmcore-authority) for more information.
162+
163+
Select the host provider to use when authenticating by which authority is supported by the providers.
164+
165+
Authority|Provider(s)
166+
-|-
167+
`auto` _(default)_|_\[automatic\]_
168+
`msa`, `microsoft`, `microsoftaccount`,<br/>`aad`, `azure`, `azuredirectory`,</br>`live`, `liveconnect`, `liveid`|Azure Repos<br/>_(supports Microsoft Authentication)_
169+
`github`|GitHub<br/>_(supports GitHub Authentication)_
170+
`basic`, `integrated`, `windows`, `kerberos`, `ntlm`,<br/>`tfs`, `sso`|Generic<br/>_(supports Basic and Windows Integrated Authentication)_
171+
172+
#### Example
173+
174+
##### Windows
175+
176+
```batch
177+
SET GCM_AUTHORITY=github
178+
```
179+
180+
##### macOS/Linux
181+
182+
```bash
183+
export GCM_AUTHORITY=github
184+
```
185+
186+
**Also see: [credential.authority](configuration.md#credentialauthority-deprecated)**
187+
188+
---
189+
190+
### GCM_ALLOW_WINDOWSAUTH
191+
192+
Allow detection of Windows Integrated Authentication (WIA) support for generic host providers. Setting this value to `false` will prevent the use of WIA and force a basic authentication prompt when using the Generic host provider.
193+
194+
**Note:** WIA is only supported on Windows.
195+
196+
**Note:** WIA is an umbrella term for NTLM and Kerberos (and Negotiate).
197+
198+
Value|WIA detection
199+
-|-
200+
`true`, `1`, `yes`, `on` _(default)_|Permitted
201+
`false`, `0`, `no`, `off`|Not permitted
202+
203+
#### Example
204+
205+
##### Windows
206+
207+
```batch
208+
SET GCM_ALLOW_WINDOWSAUTH=0
209+
```
210+
211+
##### macOS/Linux
212+
213+
```bash
214+
export GCM_ALLOW_WINDOWSAUTH=0
215+
```
216+
217+
**Also see: [credential.allowWindowsAuth](environment.md#credentialallowWindowsAuth)**
218+
219+
---
220+
221+
### GCM_HTTP_PROXY _(deprecated)_
222+
223+
> This setting is deprecated and should be replaced by the [standard `http.proxy` Git configuration option](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpproxy).
224+
>
225+
> Click [here](https://aka.ms/gcmcore-httpproxy) for more information.
226+
227+
Configure GCM Core to use the a proxy for network operations.
228+
229+
**Note:** Git itself does _not_ respect this setting; this affects GCM _only_.
230+
231+
##### Windows
232+
233+
```batch
234+
SET GCM_HTTP_PROXY=http://john.doe:[email protected]
235+
```
236+
237+
##### macOS/Linux
238+
239+
```bash
240+
export GCM_HTTP_PROXY=http://john.doe:[email protected]
241+
```
242+
243+
**Also see: [credential.httpProxy](configuration.md#credentialhttpProxy-deprecated)**

docs/migration.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Migration Guide
2+
3+
## Migrating from Git Credential Manager for Windows
4+
5+
### GCM_AUTHORITY
6+
7+
This setting (and the corresponding `credential.authority` configuration) is deprecated and should be replaced with the `GCM_PROVIDER` (or corresponding `credential.authority` configuration) setting.
8+
9+
Because both Basic HTTP authentication and Windows Integrated Authentication (WIA) are now handled by one provider, if you specified `basic` as your authority you also need to disable WIA using `GCM_ALLOW_WINDOWSAUTH` / `credential.allowWindowsAuth`.
10+
11+
The following table shows the correct replacement for all legacy authorities values:
12+
13+
GCM_AUTHORITY<br/>(credential.authority)|&rarr;|GCM_PROVIDER<br/>(credential.provider)|GCM_ALLOW_WINDOWSAUTH<br/>(credential.allowWindowsAuth)
14+
-|-|-|-
15+
`msa`, `microsoft`, `microsoftaccount`,<br/>`aad`, `azure`, `azuredirectory`,</br>`live`, `liveconnect`, `liveid`|&rarr;|`azure-repos`|_N/A_
16+
`github`|&rarr;|`github`|_N/A_
17+
`basic`|&rarr;|`generic`|`false`
18+
`integrated`, `windows`, `kerberos`, `ntlm`,<br/>`tfs`, `sso`|&rarr;|`generic`|`true` _(default)_
19+
20+
For example if you had previous set the authority for the `example.com` host to `basic`..
21+
22+
```shell
23+
git config --global credential.example.com.authority basic
24+
```
25+
26+
..then you can replace this with the following..
27+
28+
```shell
29+
git config --global --unset credential.example.com.authority
30+
git config --global credential.example.com.provider generic
31+
git config --global credential.example.com.allowWindowsAuth false
32+
```

0 commit comments

Comments
 (0)