Skip to content

Commit b54ac74

Browse files
authored
Merge pull request #121 from microsoft/master
Cut new release with Bitbucket provider
2 parents 5ffbbcb + e4d3ac6 commit b54ac74

File tree

97 files changed

+3934
-440
lines changed

Some content is hidden

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

97 files changed

+3934
-440
lines changed

.github/ISSUE_TEMPLATE/auth-problem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Git Credential Manager version 2.0.8-beta+e1f8492d04 (macOS, .NET Core 4.6.27129
2020
* [ ] Azure DevOps Server (TFS/on-prem)
2121
* [ ] GitHub
2222
* [ ] GitHub Enterprise
23-
* [ ] BitBucket
23+
* [ ] Bitbucket
2424
* [ ] Other - please describe
2525

2626
**Can you access the remote repository directly in the browser using the remote URL?**
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "release-homebrew"
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Get macOS package version
11+
uses: actions/[email protected]
12+
id: version
13+
with:
14+
result-encoding: string
15+
script: |
16+
const { data } = await github.repos.getReleaseByTag({
17+
owner: context.repo.owner,
18+
repo: context.repo.repo,
19+
tag: process.env.GITHUB_REF
20+
});
21+
const regex = /gcmcore-osx-(.*)\.pkg/;
22+
const asset = data.assets.find(x => regex.test(x.name));
23+
const matches = asset.name.match(regex);
24+
const version = matches[1];
25+
return version;
26+
- name: Update Homebrew tap
27+
uses: mjcheetham/update-homebrew@v1
28+
with:
29+
token: ${{ secrets.HOMEBREW_TOKEN }}
30+
tap: microsoft/git
31+
name: git-credential-manager-core
32+
type: cask
33+
version: ${{ steps.version.outputs.result }}

Git-Credential-Manager.sln

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{83BD5957-A
6060
EndProject
6161
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.UI.Windows", "src\windows\GitHub.UI.Windows\GitHub.UI.Windows.csproj", "{4C2DBC8A-B3F2-4C64-870A-BA79DA4BD403}"
6262
EndProject
63+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlassian.Bitbucket", "src\shared\Atlassian.Bitbucket\Atlassian.Bitbucket.csproj", "{B49881A6-E734-490E-8EA7-FB0D9E296CFB}"
64+
EndProject
65+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlassian.Bitbucket.Tests", "src\shared\Atlassian.Bitbucket.Tests\Atlassian.Bitbucket.Tests.csproj", "{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}"
66+
EndProject
67+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.UI.Windows", "src\windows\Shared.UI.Windows\Shared.UI.Windows.csproj", "{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}"
68+
EndProject
69+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlassian.Bitbucket.UI.Windows", "src\windows\Atlassian.Bitbucket.UI.Windows\Atlassian.Bitbucket.UI.Windows.csproj", "{D34D31DF-B44A-45D3-9B39-73573077BAE0}"
70+
EndProject
6371
Global
6472
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6573
Debug|Any CPU = Debug|Any CPU
@@ -206,6 +214,46 @@ Global
206214
{4C2DBC8A-B3F2-4C64-870A-BA79DA4BD403}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
207215
{4C2DBC8A-B3F2-4C64-870A-BA79DA4BD403}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
208216
{4C2DBC8A-B3F2-4C64-870A-BA79DA4BD403}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
217+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
218+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
219+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
220+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.Release|Any CPU.Build.0 = Release|Any CPU
221+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
222+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
223+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.WindowsRelease|Any CPU.ActiveCfg = Debug|Any CPU
224+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.WindowsRelease|Any CPU.Build.0 = Debug|Any CPU
225+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
226+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.MacDebug|Any CPU.Build.0 = Debug|Any CPU
227+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.MacRelease|Any CPU.ActiveCfg = Debug|Any CPU
228+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB}.MacRelease|Any CPU.Build.0 = Debug|Any CPU
229+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
230+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
231+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
232+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.Release|Any CPU.Build.0 = Release|Any CPU
233+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
234+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
235+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.WindowsRelease|Any CPU.ActiveCfg = Debug|Any CPU
236+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.WindowsRelease|Any CPU.Build.0 = Debug|Any CPU
237+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
238+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.MacDebug|Any CPU.Build.0 = Debug|Any CPU
239+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.MacRelease|Any CPU.ActiveCfg = Debug|Any CPU
240+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0}.MacRelease|Any CPU.Build.0 = Debug|Any CPU
241+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
242+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
243+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
244+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
245+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
246+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}.MacRelease|Any CPU.ActiveCfg = Release|Any CPU
247+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
248+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
249+
{D34D31DF-B44A-45D3-9B39-73573077BAE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
250+
{D34D31DF-B44A-45D3-9B39-73573077BAE0}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
251+
{D34D31DF-B44A-45D3-9B39-73573077BAE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
252+
{D34D31DF-B44A-45D3-9B39-73573077BAE0}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
253+
{D34D31DF-B44A-45D3-9B39-73573077BAE0}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
254+
{D34D31DF-B44A-45D3-9B39-73573077BAE0}.MacRelease|Any CPU.ActiveCfg = Release|Any CPU
255+
{D34D31DF-B44A-45D3-9B39-73573077BAE0}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
256+
{D34D31DF-B44A-45D3-9B39-73573077BAE0}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
209257
EndGlobalSection
210258
GlobalSection(SolutionProperties) = preSolution
211259
HideSolutionNode = FALSE
@@ -227,6 +275,10 @@ Global
227275
{85903170-9E52-4B53-A6E4-3F416F684FAE} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
228276
{8DBBAB0A-970D-4BE3-958C-8CDC92F76549} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
229277
{4C2DBC8A-B3F2-4C64-870A-BA79DA4BD403} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
278+
{B49881A6-E734-490E-8EA7-FB0D9E296CFB} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
279+
{025E5329-A0B1-4BA9-9203-B70B44A5F9E0} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
280+
{2B3CD8FF-84A6-4B53-A28B-D7A75B0AB4D7} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
281+
{D34D31DF-B44A-45D3-9B39-73573077BAE0} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
230282
EndGlobalSection
231283
GlobalSection(ExtensibilityGlobals) = postSolution
232284
SolutionGuid = {0EF9FC65-E6BA-45D4-A455-262A9EA4366B}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:String x:Key="/Default/Environment/Hierarchy/Build/SolBuilderDuo/UseMsbuildSolutionBuilder/@EntryValue">No</s:String>
3-
<s:Boolean x:Key="/Default/UserDictionary/Words/=PKCE/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
3+
<s:Boolean x:Key="/Default/UserDictionary/Words/=PKCE/@EntryIndexedValue">True</s:Boolean>
4+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bitbucket/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

NOTICE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Do Not Translate or Localize
44
This repository for Git Credential Manager Core includes material from the
55
projects listed below.
66

7+
--------------------------------------------------------------------------------
78
1. GitHub/VisualStudio (https://github.com/github/VisualStudio)
89

910
Copyright (c) GitHub Inc.
@@ -24,3 +25,30 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
2425
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
2526
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2627
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28+
29+
--------------------------------------------------------------------------------
30+
2. dotnet/runtime (https://github.com/dotnet/runtime)
31+
32+
The MIT License (MIT)
33+
34+
Copyright (c) .NET Foundation and Contributors
35+
36+
All rights reserved.
37+
38+
Permission is hereby granted, free of charge, to any person obtaining a copy
39+
of this software and associated documentation files (the "Software"), to deal
40+
in the Software without restriction, including without limitation the rights
41+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42+
copies of the Software, and to permit persons to whom the Software is
43+
furnished to do so, subject to the following conditions:
44+
45+
The above copyright notice and this permission notice shall be included in all
46+
copies or substantial portions of the Software.
47+
48+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54+
SOFTWARE.

README.md

Lines changed: 70 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,102 @@ master|[![Build Status](https://mseng.visualstudio.com/AzureDevOps/_apis/build/s
88

99
[Git Credential Manager Core](https://github.com/Microsoft/Git-Credential-Manager-Core) (GCM Core) is a secure Git credential helper built on [.NET Core](https://microsoft.com/dotnet) that runs on Windows and macOS. Linux support is planned, but not yet scheduled.
1010

11-
Compared to Git's [built-in credential helpers]((https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)) (Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring) which provides single-factor authentication support working on any HTTP-enabled Git repository, GCM Core provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), Azure DevOps Server (formerly Team Foundation Server), and GitHub.
11+
Compared to Git's [built-in credential helpers]((https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)) (Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring) which provides single-factor authentication support working on any HTTP-enabled Git repository, GCM Core provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), Azure DevOps Server (formerly Team Foundation Server), GitHub, and Bitbucket.
1212

13-
## Public preview for macOS
13+
## Public preview
1414

15-
The long-term goal of GCM Core is to converge the .NET Framework-based [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows) (GCM Windows), and the Java-based [Git Credential Manager for Mac and Linux](https://github.com/Microsoft/Git-Credential-Manager-for-Mac-and-Linux) (Java GCM), providing a consistent authentication experience across all platforms.
15+
The long-term goal of Git Credential Manager Core (GCM Core) is to converge the .NET Framework-based [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows) (GCM), and the Java-based [Git Credential Manager for Mac and Linux](https://github.com/Microsoft/Git-Credential-Manager-for-Mac-and-Linux) (Java GCM), providing a consistent authentication experience across all platforms.
1616

1717
### Current status
1818

19-
GCM Core is currently in preview only for macOS, with a Windows preview following soon. Until that time we recommend Windows users to continue to use GCM Windows. Linux support is planned, but not yet scheduled. For now, we recommend [SSH for authentication to Azure DevOps](https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops).
19+
Git Credential Manager Core is currently in preview for macOS and Windows. Linux support is planned, but not yet scheduled. For now, we recommend [SSH for authentication to Azure DevOps](https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops) for Linux users.
2020

2121
Feature|Windows|macOS|Linux
2222
-|:-:|:-:|:-:
23-
Installer/uninstaller||&#10003;|
23+
Installer/uninstaller|&#10003;|&#10003;|
2424
Secure platform credential storage|&#10003;<br/>Windows Credential Manager|&#10003;<br/>macOS Keychain|
25-
Multi-factor authentication support for Azure DevOps|&#10003;|&#10003;|
25+
Multi-factor authentication support for Azure DevOps|&#10003;|&#10003;|&#10003;\*
2626
Two-factor authentication support for GitHub|&#10003;|&#10003;\*|&#10003;\*
27-
Two-factor authentication support for BitBucket|||
27+
Two-factor authentication support for Bitbucket|&#10003;|&#10003;\*|&#10003;\*
2828
Windows Integrated Authentication (NTLM/Kerberos) support|&#10003;|_N/A_|_N/A_
2929
Basic HTTP authentication support|&#10003;|&#10003;|&#10003;
30+
Proxy support|&#10003;|&#10003;|
3031

3132
**Notes:**
3233

33-
(\*) Currently only supported when using Git from the terminal or command line. A platform-native UI experience for GitHub is not yet available on macOS, but planned.
34+
(\*) Currently only supported when using Git from the terminal or command line. A platform-native UI experience is not yet available on macOS, but planned.
3435

3536
### Planned features
3637

37-
- [ ] Proxy support
38-
- [ ] Windows installer
39-
- [ ] Improved GitHub support (platform-native UI)
40-
- [ ] BitBucket
41-
- [ ] Linux installer
38+
- [ ] 32-bit Windows support (only 64-bit Windows is supported currently)
39+
- [ ] Linux support
40+
- [ ] macOS/Linux native UI
4241

4342
## Download and Install
4443

45-
To use GCM Core, you can download the [latest installer](https://github.com/Microsoft/Git-Credential-Manager-Core/releases/latest) for your platform. To install, double-click installation package and follow the instructions presented.
44+
### macOS Homebrew
4645

47-
### Git Credential Manager for Mac and Linux (Java-based GCM)
46+
The preferred installation mechanism is using Homebrew; we offer a Cask in our custom Tap.
47+
48+
To install, run the following:
49+
50+
```shell
51+
brew tap microsoft/git
52+
brew cask install git-credential-manager-core
53+
```
54+
55+
#### Git Credential Manager for Mac and Linux (Java-based GCM)
4856

4957
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.
5058

59+
#### Uninstall
60+
61+
To uninstall, run the following:
62+
63+
```shell
64+
brew cask uninstall git-credential-manager-core
65+
```
66+
67+
---
68+
69+
### macOS Package
70+
71+
We also provide a [.pkg installer](https://github.com/Microsoft/Git-Credential-Manager-Core/releases/latest) with each release. To install, double-click the installation package and follow the instructions presented.
72+
73+
#### Uninstall
74+
75+
To uninstall, run the following:
76+
77+
```shell
78+
sudo /usr/local/share/gcm-core/uninstall.sh
79+
```
80+
81+
---
82+
83+
### Windows
84+
85+
You can download the [latest installer](https://github.com/Microsoft/Git-Credential-Manager-Core/releases/latest) for Windows. To install, double-click the installation package and follow the instructions presented.
86+
87+
#### Git Credential Manager for Windows
88+
89+
GCM Core installs side-by-side any existing Git Credential Manager for Windows installation and will take precedence over it and use any existing credentials so you shouldn't need to re-authenticate.
90+
91+
#### Uninstall (Windows 10)
92+
93+
To uninstall, open the Settings app and navigate to the Apps section. Select "Git Credential Manager Core" and click "Uninstall".
94+
95+
#### Uninstall (Windows 7-8.1)
96+
97+
To uninstall, open Control Panel and navigate to the Programs and Features screen. Select "Git Credential Manager Core" and click "Remove".
98+
5199
## How to use
52100

53-
You don't! GCM gets called when Git needs credentials for an operation. For example, when pushing (`git push`) to [Azure DevOps](https://dev.azure.com), it automatically opens a window and initializes an OAuth2 flow to get your personal access token.
101+
Git Credential Manager Core is called implicitly by Git, when so configured. It is not intended to be called directly by the user.
102+
For example, when pushing (`git push`) to [Azure DevOps](https://dev.azure.com), a window is automatically opened and an OAuth2 flow is started to get your personal access token.
103+
104+
### Configuring a proxy
105+
106+
See detailed information [here](https://aka.ms/gcmcore-httpproxy).
54107

55108
## Additional Resources
56109

@@ -59,6 +112,7 @@ You don't! GCM gets called when Git needs credentials for an operation. For exam
59112
- [Command-line usage](docs/usage.md)
60113
- [Configuration options](docs/configuration.md)
61114
- [Environment variables](docs/environment.md)
115+
- [Network and HTTP configuration](docs/netconfig.md)
62116

63117
## Contributing
64118

docs/development.md

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,86 @@
11
# Development and debugging
22

3-
??
3+
Start by cloning this repository:
4+
5+
```shell
6+
git clone https://github.com/microsoft/Git-Credential-Manager-Core
7+
```
8+
9+
## Building
10+
11+
The `Git-Credential-Manager.sln` solution can be opened and built in Visual Studio, Visual Studio for Mac, Visual Studio Code, or JetBrains Rider.
12+
13+
### macOS
14+
15+
To build from inside an IDE, make sure to select the `MacDebug` or `MacRelease` solution configurations.
16+
17+
To build from the command line, run:
18+
19+
```shell
20+
dotnet build -c MacDebug
21+
```
22+
23+
You can find a copy of the installer .pkg file in `out/osx/Installer.Mac/pkg/Debug`.
24+
25+
The flat binaries can also be found in `out/osx/Installer.Mac/pkg/Debug/payload`.
26+
27+
### Windows
28+
29+
To build from inside an IDE, make sure to select the `WindowsDebug` or `WindowsRelease` solution configurations.
30+
31+
To build from the command line, run:
32+
33+
```powershell
34+
msbuild /t:restore /p:Configuration=WindowsDebug
35+
msbuild /p:Configuration=WindowsDebug
36+
```
37+
38+
You can find a copy of the installer .exe file in `out\windows\Installer.Windows\bin\Debug\net461`.
39+
40+
The flat binaries can also be found in `out\windows\Payload.Windows\bin\Debug\net461\win-x64`.
41+
42+
### Linux
43+
44+
_No information yet._
45+
46+
## Debugging
47+
48+
To debug from inside an IDE you'll want to set `Git-Credential-Manager` as the startup project, and specify one of `get`, `store`, or `erase` as a program argument.
49+
50+
To simulate Git interacting with GCM Core, when you start from your IDE of choice, you'll need to enter the following [information over standard input](https://git-scm.com/docs/git-credential#IOFMT):
51+
52+
```text
53+
protocol=http<LF>
54+
host=<HOSTNAME><LF>
55+
<LF>
56+
<LF>
57+
```
58+
59+
..where `<HOSTNAME>` is a supported hostname such as `github.com`, and `<LF>` is a line feed (or CRLF, we support both!).
60+
61+
You may also include the following optional fields, depending on your scenario:
62+
63+
```text
64+
username=<USERNAME><LF>
65+
password=<PASSWORD><LF>
66+
```
67+
68+
For more information about how Git interacts with credential helpers, please read Git's [documentation](https://git-scm.com/docs/gitcredentials#_custom_helpers).
69+
70+
### Attaching to a running process
71+
72+
If you want to debug an already running GCM Core process, set the `GCM_DEBUG` environment variable to `1` or `true`. The process will wait on launch for a debugger to attach before continuing.
73+
74+
This is useful when debugging interactions between GCM Core and Git, and you want Git to be the one launching us.
75+
76+
### Collect trace output
77+
78+
If you want to debug a release build or installation of GCM Core, you can set the `GCM_TRACE` environment variable to `1` to print trace information to standard error, or to an absolute file path to write trace information to a file.
79+
80+
For example:
81+
82+
```shell
83+
$ GCM_TRACE=1 git-credential-manager-core version
84+
> 18:47:56.526712 ...er/Application.cs:69 trace: [RunInternalAsync] Git Credential Manager version 2.0.124-beta+e1ebbe1517 (macOS, .NET Core 3.1.3) 'version'
85+
> Git Credential Manager version 2.0.124-beta+e1ebbe1517 (macOS, .NET Core 3.1.3)
86+
```

0 commit comments

Comments
 (0)