Skip to content

Commit

Permalink
Merge pull request #862 from wolf99/doc-line-length
Browse files Browse the repository at this point in the history
Unify line length across docs
  • Loading branch information
ldennington committed Sep 19, 2022
2 parents f230c46 + d226097 commit 9393c1f
Show file tree
Hide file tree
Showing 21 changed files with 802 additions and 345 deletions.
13 changes: 9 additions & 4 deletions .github/ISSUE_TEMPLATE/auth-problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ origin https://dev.azure.com/contoso/_git/widgets
* [ ] https://`{org}`@dev.azure.com/`{org}`/...
* [ ] https://`{org}`.visualstudio.com/...

**_[Azure DevOps only]_ If the account picker shows more than one identity as you authenticate, check that you selected the same one that has access on the web.**
**_[Azure DevOps only]_ If the account picker shows more than one identity as
you authenticate, check that you selected the same one that has access on the
web.**

* [ ] Not applicable
* [ ] I only see one identity
Expand All @@ -58,13 +60,16 @@ I am authenticated and my Git operation completes successfully.

**Actual behavior**

A clear and concise description of what happens. For example: exception is thrown, UI freezes, etc.
A clear and concise description of what happens. For example: exception is
thrown, UI freezes, etc.

**Logs**

Set the environment variables `GCM_TRACE=1` and `GIT_TRACE=1` and re-run your Git command. Review and redact any private information and attach the log.
Set the environment variables `GCM_TRACE=1` and `GIT_TRACE=1` and re-run your
Git command. Review and redact any private information and attach the log.

If you are running inside of Windows Subsystem for Linux (WSL), you must also set an additional environment variable to enable tracing: `WSLENV=$WSLENV:GCM_TRACE`.
If you are running inside of Windows Subsystem for Linux (WSL), you must also
set an additional environment variable to enable tracing: `WSLENV=$WSLENV:GCM_TRACE`.
For example:

```shell
Expand Down
13 changes: 9 additions & 4 deletions .github/ISSUE_TEMPLATE/experimental.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ origin https://dev.azure.com/contoso/_git/widgets
* [ ] https://`{org}`@dev.azure.com/`{org}`/...
* [ ] https://`{org}`.visualstudio.com/...

**_[Azure DevOps only]_ If the account picker shows more than one identity as you authenticate, check that you selected the same one that has access on the web.**
**_[Azure DevOps only]_ If the account picker shows more than one identity as
you authenticate, check that you selected the same one that has access on the
web.**

* [ ] Not applicable
* [ ] I only see one identity
Expand All @@ -58,13 +60,16 @@ I am authenticated and my Git operation completes successfully.

**Actual behavior**

A clear and concise description of what happens. For example: exception is thrown, UI freezes, etc.
A clear and concise description of what happens. For example: exception is
thrown, UI freezes, etc.

**Logs**

Set the environment variables `GCM_TRACE=1` and `GIT_TRACE=1` and re-run your Git command. Review and redact any private information and attach the log.
Set the environment variables `GCM_TRACE=1` and `GIT_TRACE=1` and re-run your
Git command. Review and redact any private information and attach the log.

If you are running inside of Windows Subsystem for Linux (WSL), you must also set an additional environment variable to enable tracing: `WSLENV=$WSLENV:GCM_TRACE`.
If you are running inside of Windows Subsystem for Linux (WSL), you must also
set an additional environment variable to enable tracing: `WSLENV=$WSLENV:GCM_TRACE`.
For example:

```shell
Expand Down
7 changes: 6 additions & 1 deletion .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// For information on writing markdownlint configuration see:
// https://github.com/DavidAnson/markdownlint/blob/main/README.md#optionsconfig
{
"MD013": false, // Line length and line breaking convention not yet standardised across docs
"MD013": {
"line_length": 80,
"code_blocks": false,
"headings": false,
"tables": false
},
"MD024": false // The format for some files require repeated headings, e.g. "Example"
}
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][cc-homepage], version 1.4,
available at [Contributor Covenant Code of Conduct][cc-coc].
This Code of Conduct is adapted from the [Contributor Covenant][cc-homepage],
version 1.4, available at [Contributor Covenant Code of Conduct][cc-coc].

For answers to common questions about this code of conduct, see the
[Contributor Covenant FAQ][cc-faq]
Expand Down
25 changes: 17 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Contributing

Hi there! We're thrilled that you'd like to contribute to GCM :tada:. Your help is essential for keeping it great.
Hi there! We're thrilled that you'd like to contribute to GCM :tada:. Your help
is essential for keeping it great.

Contributions to GCM are [released][contribute-under-repo-license] to the public under the [project's open source license][license].
Contributions to GCM are [released][contribute-under-repo-license] to the public
under the [project's open source license][license].

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

## Start with an issue

1. Open an [issue][issue] to discuss the change you want to see.
This helps us coordinate and reduce duplication.
This helps us coordinate and reduce duplication.
1. Once we've had some discussion, you're ready to code!

## Submitting a pull request
Expand All @@ -19,20 +23,25 @@ This helps us coordinate and reduce duplication.
1. Make sure the tests pass on your machine: `dotnet test`
1. Create a new branch: `git switch -c my-branch-name`
1. Make your change, add tests, and make sure the tests still pass
1. For UI updates, test your changes by executing a `dotnet run` in applicable UI-related project directories:
1. For UI updates, test your changes by executing a `dotnet run` in applicable
UI-related project directories:
- `Atlassian.Bitbucket.UI.Avalonia`
- `GitHub.UI.Avalonia`
- `Atlassian.Bitbucket.UI.Windows`
- `GitHub.UI.Windows`
1. Organize your changes into one or more [logical, descriptive commits][commits].
1. Push to your fork and [submit a pull request][pr]
1. Pat your self on the back and wait for your pull request to be reviewed and merged.
1. Pat your self on the back and wait for your pull request to be reviewed and
merged.

Here are a few things you can do that will increase the likelihood of your pull request being accepted:
Here are a few things you can do that will increase the likelihood of your pull
request being accepted:

- Match existing code style.
- Write tests.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Keep your change as focused as possible. If there are multiple changes you
would like to make that are not dependent upon each other, consider
submitting them as separate pull requests.

## Resources

Expand Down
85 changes: 60 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,25 @@

---

[Git Credential Manager][gcm] (GCM) is a secure Git credential helper built on [.NET][dotnet] that runs on Windows, macOS, and Linux.
[Git Credential Manager][gcm] (GCM) is a secure Git credential helper built on
[.NET][dotnet] that runs on Windows, macOS, and Linux.

Compared to Git's [built-in credential helpers][git-tools-credential-storage] (Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring/libsecret) which provides single-factor authentication support working on any HTTP-enabled Git repository, GCM provides multi-factor authentication support for [Azure DevOps][azure-devops], Azure DevOps Server (formerly Team Foundation Server), GitHub, Bitbucket, and GitLab.
Compared to Git's [built-in credential helpers][git-tools-credential-storage]
(Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring/libsecret) which
provides single-factor authentication support working on any HTTP-enabled Git
repository, GCM provides multi-factor authentication support for
[Azure DevOps][azure-devops], Azure DevOps Server (formerly Team Foundation
Server), GitHub, Bitbucket, and GitLab.

Git Credential Manager (GCM) replaces the .NET Framework-based [Git Credential Manager for Windows][gcm-for-windows] (GCM), and the Java-based [Git Credential Manager for Mac and Linux][gcm-for-mac-and-linux] (Java GCM), providing a consistent authentication experience across all platforms.
Git Credential Manager (GCM) replaces the .NET Framework-based
[Git Credential Manager for Windows][gcm-for-windows] (GCM), and the Java-based
[Git Credential Manager for Mac and Linux][gcm-for-mac-and-linux] (Java GCM),
providing a consistent authentication experience across all platforms.

## Current status

Git Credential Manager is currently available for Windows, macOS, and Linux\*. GCM only works with HTTP(S) remotes; you can still use Git with SSH:
Git Credential Manager is currently available for Windows, macOS, and Linux\*.
GCM only works with HTTP(S) remotes; you can still use Git with SSH:

- [Azure DevOps SSH][azure-devops-ssh]
- [GitHub SSH][github-ssh]
Expand All @@ -34,7 +44,10 @@ Proxy support|✓|✓|✓
`arm64` support|best effort|✓|best effort, no packages
`armhf` support|_N/A_|_N/A_|best effort, no packages

(\*) GCM guarantees support for the below Linux distributions. GCM maintainers also monitor and evaluate issues opened against other distributions to determine community interest/engagement and whether an emerging platform should become fully-supported.
(\*) GCM guarantees support for the below Linux distributions. GCM maintainers
also monitor and evaluate issues opened against other distributions to determine
community interest/engagement and whether an emerging platform should become
fully-supported.

- Debian/Ubuntu/Linux Mint
- Fedora/CentOS/RHEL
Expand All @@ -44,7 +57,8 @@ Proxy support|✓|✓|✓

### macOS Homebrew

The preferred installation mechanism is using Homebrew; we offer a Cask in our custom Tap.
The preferred installation mechanism is using Homebrew; we offer a Cask in our
custom Tap.

To install, run the following:

Expand All @@ -61,7 +75,9 @@ brew upgrade git-credential-manager-core

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

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 is installed.
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 is installed.

#### Uninstall

Expand All @@ -75,7 +91,8 @@ brew uninstall --cask git-credential-manager-core

### macOS Package

We also provide a [.pkg installer][latest-release] with each release. To install, double-click the installation package and follow the instructions presented.
We also provide a [.pkg installer][latest-release] with each release. To install,
double-click the installation package and follow the instructions presented.

#### Uninstall

Expand Down Expand Up @@ -159,43 +176,55 @@ To uninstall:
[Follow these instructions][linux-uninstall] for your distribution.
**Note:** all Linux distributions [require additional configuration][gcm-credstores] to use GCM.
**Note:** all Linux distributions
[require additional configuration][gcm-credstores] to use GCM.
---
### Windows
GCM is included with [Git for Windows][git-for-windows], and the latest version is included in each new Git for Windows release. This is the preferred way to install GCM on Windows. During installation you will be asked to select a credential helper, with GCM being set as the default.
GCM is included with [Git for Windows][git-for-windows], and the latest version
is included in each new Git for Windows release. This is the preferred way to
install GCM on Windows. During installation you will be asked to select a
credential helper, with GCM being set as the default.
![image][git-for-windows-screenshot]
#### Standalone installation
You can also download the [latest installer][latest-release] for Windows to install GCM standalone.
You can also download the [latest installer][latest-release] for Windows to
install GCM standalone.
**:warning: Important :warning:**
Installing GCM as a standalone package on Windows will forcibly override the version of GCM that is bundled with Git for Windows, **even if the version bundled with Git for Windows is a later version**.
Installing GCM as a standalone package on Windows will forcibly override the
version of GCM that is bundled with Git for Windows, **even if the version
bundled with Git for Windows is a later version**.
There are two flavors of standalone installation on Windows:
- User (preferred) (`gcmuser-win*`):
Does not require administrator rights. Will install only for the current user and updates only the current user's Git configuration.
Does not require administrator rights. Will install only for the current user
and updates only the current user's Git configuration.

- System (`gcm-win*`):

Requires administrator rights. Will install for all users on the system and update the system-wide Git configuration.
Requires administrator rights. Will install for all users on the system and
update the system-wide Git configuration.

To install, double-click the desired installation package and follow the instructions presented.
To install, double-click the desired installation package and follow the
instructions presented.

#### Uninstall (Windows 10)

To uninstall, open the Settings app and navigate to the Apps section. Select "Git Credential Manager" and click "Uninstall".
To uninstall, open the Settings app and navigate to the Apps section. Select
"Git Credential Manager" and click "Uninstall".

#### Uninstall (Windows 7-8.1)

To uninstall, open Control Panel and navigate to the Programs and Features screen. Select "Git Credential Manager" and click "Remove".
To uninstall, open Control Panel and navigate to the Programs and Features
screen. Select "Git Credential Manager" and click "Remove".

#### Windows Subsystem for Linux (WSL)

Expand All @@ -218,16 +247,21 @@ Git that are not compatible.
- Git 2.26.2

This version of Git introduced a breaking change with parsing credential
configuration that GCM relies on. This issue was fixed in commit [`12294990`][gcm-commit-12294990]
of the Git project, and released in Git 2.27.0.
configuration that GCM relies on. This issue was fixed in commit
[`12294990`][gcm-commit-12294990] of the Git project, and released in Git
2.27.0.

## How to use

Once it's installed and configured, Git Credential Manager is called implicitly by Git.
You don't have to do anything special, and GCM isn't intended to be called directly by the user.
For example, when pushing (`git push`) to [Azure DevOps][azure-devops], [Bitbucket][bitbucket], or [GitHub][github], a window will automatically open and walk you through the sign-in process.
(This process will look slightly different for each Git host, and even in some cases, whether you've connected to an on-premises or cloud-hosted Git host.)
Later Git commands in the same repository will re-use existing credentials or tokens that GCM has stored for as long as they're valid.
Once it's installed and configured, Git Credential Manager is called implicitly
by Git. You don't have to do anything special, and GCM isn't intended to be
called directly by the user. For example, when pushing (`git push`) to
[Azure DevOps][azure-devops], [Bitbucket][bitbucket], or [GitHub][github], a
window will automatically open and walk you through the sign-in process. (This
process will look slightly different for each Git host, and even in some cases,
whether you've connected to an on-premises or cloud-hosted Git host.) Later Git
commands in the same repository will re-use existing credentials or tokens that
GCM has stored for as long as they're valid.
Read full command line usage [here][gcm-usage].
Expand Down Expand Up @@ -264,7 +298,8 @@ This project follows [GitHub's Open Source Code of Conduct][gcm-coc].
## License

We're [MIT][gcm-license] licensed.
When using GitHub logos, please be sure to follow the [GitHub logo guidelines][github-logos].
When using GitHub logos, please be sure to follow the
[GitHub logo guidelines][github-logos].
[azure-devops]: https://dev.azure.com/
[azure-devops-ssh]: https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops
Expand Down
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Security

If you discover a security issue in this repo, please submit it through the [GitHub Security Bug Bounty][hackerone-github]
If you discover a security issue in this repo, please submit it through the
[GitHub Security Bug Bounty][hackerone-github]

Thanks for helping make GitHub products safe for everyone.

Expand Down
19 changes: 10 additions & 9 deletions docs/autodetect.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ In order to detect which host provider to use for a self-hosted instance, each
provider can provide some heuristic matching of the hostname. For example any
hostname that begins "github.*" will be matched to the GitHub host provider.

If a heuristic matches incorrectly, you can always [explicitly configure][explicit-config]
GCM to use a particular provider.
If a heuristic matches incorrectly, you can always
[explicitly configure][explicit-config] GCM to use a particular provider.

## Remote URL probing

Expand All @@ -28,8 +28,9 @@ URL and inspect HTTP response headers to try and detect a self-hosted instance.

This network call is only performed if neither an exact nor fuzzy match by
hostname can be made. Only one HTTP `HEAD` call is made per credential request
received by Git. To avoid this network call, please [explicitly configure][explicit-config]
the host provider for your self-hosted instance.
received by Git. To avoid this network call, please
[explicitly configure][explicit-config] the host provider for your self-hosted
instance.

After a successful detection of the host provider, GCM will automatically set
the [`credential.provider`][credential-provider] configuration entry
Expand All @@ -39,8 +40,8 @@ future requests.
### Timeout

You can control how long GCM will wait for a response to the remote network call
by setting the [`GCM_AUTODETECT_TIMEOUT`][gcm-autodetect-timeout]
environment variable, or the [`credential.autoDetectTimeout`][credential-autoDetectTimeout]
by setting the [`GCM_AUTODETECT_TIMEOUT`][gcm-autodetect-timeout] environment
variable, or the [`credential.autoDetectTimeout`][credential-autoDetectTimeout]
Git configuration setting to the maximum number of milliseconds to wait.

The default value is 2000 milliseconds (2 seconds). You can prevent the network
Expand All @@ -52,9 +53,9 @@ If the auto-detection mechanism fails to select the correct host provider, or
if the remote probing network call is causing performance issues, you can
configure GCM to always use a particular host provider, for a given remote URL.

You can either use the the [`GCM_PROVIDER`][gcm-provider]
environment variable, or the [`credential.provider`][credential-provider]
Git configuration setting for this purpose.
You can either use the the [`GCM_PROVIDER`][gcm-provider] environment variable,
or the [`credential.provider`][credential-provider] Git configuration setting
for this purpose.

For example to tell GCM to always use the GitHub host provider for the
"ghe.example.com" hostname, you can run the following command:
Expand Down
Loading

0 comments on commit 9393c1f

Please sign in to comment.