Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release #530

Merged
merged 38 commits into from
Nov 15, 2021
Merged

New release #530

merged 38 commits into from
Nov 15, 2021

Conversation

ldennington and others added 30 commits October 8, 2021 10:43
`wingetcreate` is a Windows exe and thus must be run on Windows. Updating
our release-winget workflow accordingly.
Updating inno installer metadata to align with the specification outlined in
github/git-fundamentals#700. Also adding
appropriate quotations to `Installer.Windows.csproj` to handle paths with
spaces.
Set up infrastructure for `wingetcreate`
Add a section to the README document that lists versions of Git that GCM
is known to have problems with, such as 2.26.2 that broke credential
configuration parsing.
Update README to list versions of Git that we are/not compatible with
Remove the "info: detecting host provider for 'URL'..." message that is
only causing noise for users.

Fixes #492
Remove auto-detection progress/info message
* add pat as possible option to credential.gitHubAuthModes
* add pat as possible option to GCM_GITHUB_AUTHMODES
* fix formatting
This change updates the following assembly names:

Microsoft.Git.CredentialManager --> gcmcore
Microsoft.Git.CredentialManager.UI --> gcmcoreui
Microsoft.Git.CredentialManager.UI.Avalonia --> gcmcoreuiavn
Shared.UI.Windows --> gcmcoreuiwpf

It also updates the corresponding xaml/iss files with the new names.
Updated the following namespaces:

TestInfrastructure --> GitCredentialManager.Tests
Microsoft.Git.CredentialManager --> GitCredentialManager
Microsoft.Git.CredentialManager.Tests --> GitCredentialManager.Tests
Microsoft.Git.CredentialManager.UI --> GitCredentialManager.UI
Microsoft.Git.CredentialManager.UI.Avalonia -->	GitCredentialManager.UI
Shared.UI.Windows --> GitCredentialManager.UI
Git-Credential-Manager --> GitCredentialManager
This change updates the following project/directory names according to the
below:

Microsoft.Git.CredentialManager --> Core
Microsoft.Git.CredentialManager.Tests --> Core.Tests
Microsoft.Git.CredentialManager.UI --> Core.UI
Microsoft.Git.CredentialManager.UI.Avalonia --> Core.UI.Avalonia
Shared.UI.Windows --> Core.UI.Windows
Replace Microsoft in GCM namespaces/file names
Recommend testing of impacted projects with UI changes.
Remove line from README stating we don't deploy our debian packages to
official Microsoft feeds.
Update our MSAL.NET dependency to 4.37 from 4.31. This should come with
the following updates/fixes that we care about:

- Can set embedded web view (legacy) window title to custom message
- Fixes some problems with WAM dialogs appearing behind parent windows
- Moves WAM to no longer being experimental
- Better MSA-PT support when used with WAM
- Numerous performance improvements with authority discovery
- Various WAM bug fixes

Fixes #239
We aim to be compatible with the behaviour of Git as much as possible
when it comes to network settings. This enables users to setup Git proxy
settings and get the same setup "for free" with GCM.

Git uses libcurl to provide it's HTTP interactions. The NO_PROXY setting
is used by libcurl to disable proxy settings for specific hosts.

We previously attempted to plumb the value of NO_PROXY through to the
.NET WebProxy class' list of "bypassed addresses" (the set of hosts that
should not be proxied). However, the .NET class expects a set of
_regular expressions_ which is unlike libcurl!

As a result, libcurl permitted values for NO_PROXY were throwing errors
inside of GCM since they are not valid regexs.

In this commit we perform a transformation of the NO_PROXY list and
construct a set of regular expressions that match addresses in the same
way as libcurl does.

The transformation is as follows:

1. strip any leading periods '.' or wildcards '*.'
2. escape the remaining input to match literally (e.g.: '.' becomes '\.')
3. prepend a group that matches either a period '.' or a URI scheme
   delimiter '://' - this prevents partial domain matching
4. append a end-of-string symbol '$' to ensure we only match to the
   specified TLD and port

See the libcurl documentation on NO_PROXY behaviour:
https://curl.se/libcurl/c/CURLOPT_NOPROXY.html
Clean up `README.md` and `CONTRIBUTING.md`
Match `NO_PROXY` formats to libcurl behaviour
libcurl supports multiple different environment variables [1] to
configure proxy behaviour: http_proxy, https_proxy, all_proxy, and
no_proxy.

Unlike most other environment variables these proxy envars are normally
_lowercase_, not uppercase. This convention was set by libwww back in
the early 1990s. When libcurl was first released however, it was not
aware of this schism and only implemented checks for uppercase variants
of these envars: HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY.

In time, libcurl learned to also read the lowercase variants, and gives
them precedence over the uppercase forms (since the former are quasi-
standards).

However, to further complicate the matter, libcurl no longer reads the
uppercase HTTP_PROXY variable specifically. This change was made to
address a security concern with some CGI webservers [2].

The problem is that today GCM only reads the uppercase variants of the
environment variables! This is inconsistent with libcurl, and therefore
Git's behaviour (that we aim to be consistent/co-operative with).

We change GCM's behaviour to match that of libcurl/Git in that the
lowercase proxy envars are preferred to the uppercase ones, and the
uppercase HTTP_PROXY variable is ignored.

Dropping support for the HTTP_PROXY uppercase envar is technically a
breaking change, but if the user had only set this uppercase envar then
Git would not be proxying the actual remote calls, only GCM, which is
most likely not what the user wanted.

[1] https://everything.curl.dev/usingcurl/proxies#proxy-environment-variables
[2] https://everything.curl.dev/usingcurl/proxies#http_proxy-in-lower-case-only
Match libcurl lowercase proxy environment variable behaviour
Call out that installing GCM as part of G4W is preferred.
Update readme to call out G4W bundling
Include missing Avalonia native shared libraries in the Debian package.

They are already being included in the tarball, but omited from the
Debian package. Change the build script to do a recursive copy `cp -R`
so that as dependencies change over time, we don't miss any!
With the move to the Git Credential Manager org (and the general direction
we're heading in for our release processes) we no longer want to deploy
debian packages to Microsoft feeds. We may re-visit a different feed in the
future, but removing the workflow for now - users can install the debian
package from the releases page or install from source.
We are no longer deploying debian packages to Microsoft feeds. Further, all
previous deployments have been removed from the applicable feeds. Removing
the instructions for installation via apt-get in light of these changes.
ldennington and others added 8 commits November 2, 2021 14:16
Include all shared libraries in Debian package
After we've detected the host provider from an auto-detection network
probe, set the `credential.provider` setting so we can avoid the
expensive operation in the future.

If we fail to set this then warn the user and ask them to set the
configuration manually.
Set `credential.provider` after successful auto detection probe
We have decided to remove GCM Core's winget publishing workflow for the
following reasons:

1. We want to encourage Windows users to install the bundled GCM Core that
comes with Git for Windows
2. GCM Core has 2 installers with the same arch and type (user and machine),
which wingetcreate doesn't support
3. Removing this option will decrease the complexity of our GCM Core's
release matrix
4. If users need to install GCM Core separately from Git for Windows, they
can download the appropriate installer from the releases page

Thus we are removing the workflow with this change.

Note: We are unable to deprecate the packages we have already released due
to lack of `winget` support for this scenario. Tracking here:

github/git-fundamentals#756
Copy link
Contributor

@vtbassmatt vtbassmatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@mjcheetham mjcheetham merged commit e1c2b45 into release Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants