Skip to content

Commit

Permalink
gcm: rename entry executable to drop -core suffix
Browse files Browse the repository at this point in the history
Rename the main entry executable from git-credential-manager-core(.exe)
to simply git-credential-manager(.exe), now that the older GCM4W has
been removed from the Git for Windows project as an option (and the GCMC
project has been renamed).

We do not rename the Debian package ID, nor the Homebrew Cask name yet
as this will require more thought for migration.
  • Loading branch information
mjcheetham committed Oct 14, 2022
1 parent fb52269 commit a34ee31
Show file tree
Hide file tree
Showing 24 changed files with 93 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/auth-problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''

**Which version of GCM are you using?**

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

<!-- Ex:
Git Credential Manager version 2.0.8-beta+e1f8492d04 (macOS, .NET Core 4.6.27129.04)
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/experimental.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''

**Which version of GCM are you using?**

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

<!-- Ex:
Git Credential Manager version 2.0.8-beta+e1f8492d04 (macOS, .NET Core 4.6.27129.04)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -443,17 +443,17 @@ jobs:
component:
- os: ubuntu-latest
artifact: linux-sign
command: git-credential-manager-core
command: git-credential-manager
- os: macos-latest
artifact: osx-x64-sign
command: git-credential-manager-core
command: git-credential-manager
- os: windows-latest
artifact: win-sign
# Even when a standalone GCM version is installed, GitHub actions
# runners still only recognize the version bundled with Git for
# Windows due to its placement on the PATH. For this reason, we use
# the full path to our installation to validate the Windows version.
command: "$PROGRAMFILES (x86)/Git Credential Manager/git-credential-manager-core.exe"
command: "$PROGRAMFILES (x86)/Git Credential Manager/git-credential-manager.exe"
runs-on: ${{ matrix.component.os }}
needs: [ osx-sign, win-sign, linux-sign ]
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
fi
sh "${GITHUB_WORKSPACE}/src/linux/Packaging.Linux/install-from-source.sh" -y
git-credential-manager-core --help || exit 1
git-credential-manager --help || exit 1
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager-core.dll",
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager.dll",
"args": ["get"],
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
"console": "integratedTerminal",
Expand All @@ -22,7 +22,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager-core.dll",
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager.dll",
"args": ["store"],
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
"console": "integratedTerminal",
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Download the latest [.deb package][latest-release], and run the following:

```shell
sudo dpkg -i <path-to-package>
git-credential-manager-core configure
git-credential-manager configure
```

**Note:** Although packages were previously offered on certain
Expand All @@ -127,7 +127,7 @@ Debian package using the above instructions instead.
To uninstall:

```shell
git-credential-manager-core unconfigure
git-credential-manager unconfigure
sudo dpkg -r gcmcore
```

Expand All @@ -139,14 +139,14 @@ Download the latest [tarball][latest-release], and run the following:

```shell
tar -xvf <path-to-tarball> -C /usr/local/bin
git-credential-manager-core configure
git-credential-manager configure
```

To uninstall:

```shell
git-credential-manager-core unconfigure
rm $(command -v git-credential-manager-core)
git-credential-manager unconfigure
rm $(command -v git-credential-manager)
```

#### Option 2: Install from source helper script
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ library (C#). The library targets .NET Standard as well as .NET Framework.
The entry-point for GCM can be found in the `Git-Credential-Manager`
project, a console application that targets both .NET and .NET Framework.
This project emits the `git-credential-manager-core(.exe)` executable, and
This project emits the `git-credential-manager(.exe)` executable, and
contains very little code - registration of all supported host providers and
running the `Application` object found in `Core`.

Expand Down
16 changes: 8 additions & 8 deletions docs/azrepos-users-and-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ In advanced scenarios (such as using multiple accounts) you can interact with
and manage remembered user accounts using the 'azure-repos' provider command:

```shell
git-credential-manager-core azure-repos [ list | bind | unbind | ... ] <options>
git-credential-manager azure-repos [ list | bind | unbind | ... ] <options>
```

##### Listing remembered accounts
Expand All @@ -79,7 +79,7 @@ You can list all bound user accounts by Git Credential Manager for each Azure
DevOps organization using the `list` command:

```shell
$ git-credential-manager-core azure-repos list
$ git-credential-manager azure-repos list
contoso:
(global) -> alice@contoso.com
fabrikam:
Expand All @@ -105,7 +105,7 @@ the `.git/config` file. If there are local bindings in a repository you can show
them with the `list` command:

```shell
~/myrepo$ git-credential-manager-core azure-repos list
~/myrepo$ git-credential-manager azure-repos list
contoso:
(global) -> alice@contoso.com
(local) -> alice-alt@contoso.com
Expand All @@ -118,7 +118,7 @@ To create a local binding, use the `bind` command with the `--local` option when
inside a repository:

```shell
~/myrepo$ git-credential-manager-core azure-repos bind --local contoso alice-alt@contso.com
~/myrepo$ git-credential-manager azure-repos bind --local contoso alice-alt@contso.com
```

```diff
Expand All @@ -132,7 +132,7 @@ inside a repository:
To have Git Credential Manager forget a user account, use the `unbind` command:

```shell
git-credential-manager-core azure-repos unbind fabrikam
git-credential-manager azure-repos unbind fabrikam
```

```diff
Expand All @@ -151,7 +151,7 @@ To forget or remove a local binding, within the repository run the `unbind`
command with the `--local` option:

```shell
~/myrepo$ git-credential-manager-core azure-repos unbind --local contoso
~/myrepo$ git-credential-manager azure-repos unbind --local contoso
```

```diff
Expand All @@ -170,7 +170,7 @@ To show which accounts are being used for each Git remote in a repository use
the `list` command with the `--show-remotes` option:

```shell
~/myrepo$ git-credential-manager-core azure-repos list --show-remotes
~/myrepo$ git-credential-manager azure-repos list --show-remotes
contoso:
(global) -> alice@contoso.com
origin:
Expand Down Expand Up @@ -208,7 +208,7 @@ The `list --show-remotes` command will show the user account specified in the
remote URL:

```shell
~/myrepo$ git-credential-manager-core azure-repos list --show-remotes
~/myrepo$ git-credential-manager azure-repos list --show-remotes
contoso:
(global) -> alice@contoso.com
origin:
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Additionally, GCM respects several GCM-specific [environment variables][envars]
also configure [default values][enterprise-config] for many settings used by GCM.

GCM will only be used by Git if it is installed and configured. Use
`git config --global credential.helper manager-core` to assign GCM as your
`git config --global credential.helper manager` to assign GCM as your
credential helper. Use `git config credential.helper` to see the current
configuration.

Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ error, or to an absolute file path to write trace information to a file.
For example:

```shell
$ GCM_TRACE=1 git-credential-manager-core version
$ GCM_TRACE=1 git-credential-manager version
> 18:47:56.526712 ...er/Application.cs:69 trace: [RunInternalAsync] Git Credential Manager version 2.0.124-beta+e1ebbe1517 (macOS, .NET 5.0) 'version'
> Git Credential Manager version 2.0.124-beta+e1ebbe1517 (macOS, .NET 5.0)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/linux-fromsrc-uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ pre-existing clone or the directory from which you ran the install from source
script.

```console
git-credential-manager-core unconfigure &&
sudo rm $(command -v git-credential-manager-core) &&
git-credential-manager unconfigure &&
sudo rm $(command -v git-credential-manager) &&
sudo rm -rf /usr/local/share/gcm-core &&
sudo rm -rf ~/git-credential-manager &&
sudo rm ~/install-from-source.sh
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Assuming GCM has been installed, use your favorite terminal to execute the
following commands to interact directly with GCM.

```shell
git credential-manager-core [<command> [<args>]]
git credential-manager [<command> [<args>]]
```
## Commands
Expand Down
6 changes: 3 additions & 3 deletions docs/wsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _Inside your WSL installation_, run the following command to set GCM as the Git
credential helper:

```shell
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager-core.exe"
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"
```

If you intend to use Azure DevOps you must _also_ set the following Git
Expand All @@ -44,7 +44,7 @@ _Inside your WSL installation_, run the following command to set GCM as the Git
credential helper:

```shell
git config --global credential.helper "/mnt/c/Program\ Files\ \(x86\)/Git\ Credential\ Manager/git-credential-manager-core.exe"
git config --global credential.helper "/mnt/c/Program\ Files\ \(x86\)/Git\ Credential\ Manager/git-credential-manager.exe"

# For Azure DevOps support only
git config --global credential.https://dev.azure.com.useHttpPath true
Expand All @@ -65,7 +65,7 @@ After updating the `WSLENV` environment variable, restart your WSL installation.
If you have installed GCM using the user-only installer (i.e, the `gcmuser-*.exe`
installer and not the system-wide/admin required installer), you need to modify
the above instructions to point to
`/mnt/c/Users/<USERNAME>/AppData/Local/Programs/Git\ Credential\ Manager\ Core/git-credential-manager-core.exe`
`/mnt/c/Users/<USERNAME>/AppData/Local/Programs/Git\ Credential\ Manager\ Core/git-credential-manager.exe`
instead.

## How it works
Expand Down
6 changes: 3 additions & 3 deletions src/linux/Packaging.Linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ mkdir -p "$INSTALL_TO" "$LINK_TO"
cp -R "$PAYLOAD"/* "$INSTALL_TO" || exit 1

# Create symlink
if [ ! -f "$LINK_TO/git-credential-manager-core" ]; then
ln -s -r "$INSTALL_TO/git-credential-manager-core" \
"$LINK_TO/git-credential-manager-core" || exit 1
if [ ! -f "$LINK_TO/git-credential-manager" ]; then
ln -s -r "$INSTALL_TO/git-credential-manager" \
"$LINK_TO/git-credential-manager" || exit 1
fi

if [ $INSTALL_FROM_SOURCE = false ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/osx/Installer.Mac/resources/en.lproj/conclusion.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ <h2>Other users</h2>
GCM has already been automatically configured for use by the current user with Git.
If other users wish to use GCM, have them run the following command to update their global Git configuration (<code>~/.gitconfig</code>):
</p>
<p class="mono">$ git-credential-manager-core configure</p>
<p class="mono">$ git-credential-manager configure</p>
<p>
To configure GCM for all users, run the following command to update the system Git configuration:
</p>
<p class="mono">$ git-credential-manager-core configure --system</p>
<p class="mono">$ git-credential-manager configure --system</p>
</div>
<div class="section">
<h2>Uninstall</h2>
Expand Down
4 changes: 2 additions & 2 deletions src/osx/Installer.Mac/scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ fi

# Create symlink to GCM in /usr/local/bin
mkdir -p /usr/local/bin
/bin/ln -Fs "$INSTALL_DESTINATION/git-credential-manager-core" /usr/local/bin/git-credential-manager-core
/bin/ln -Fs "$INSTALL_DESTINATION/git-credential-manager" /usr/local/bin/git-credential-manager

# Configure GCM for the current user (running as the current user to avoid root
# from taking ownership of ~/.gitconfig)
sudo -u ${USER} "$INSTALL_DESTINATION/git-credential-manager-core" configure
sudo -u ${USER} "$INSTALL_DESTINATION/git-credential-manager" configure

exit 0
6 changes: 3 additions & 3 deletions src/osx/Installer.Mac/uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

THISDIR="$( cd "$(dirname "$0")" ; pwd -P )"
GCMBIN="$THISDIR/git-credential-manager-core"
GCMBIN="$THISDIR/git-credential-manager"

# Ensure we're running as root
if [ $(id -u) != "0" ]
Expand All @@ -15,10 +15,10 @@ echo "Unconfiguring credential helper..."
sudo -u `/usr/bin/logname` -E "$GCMBIN" unconfigure

# Remove symlink
if [ -L /usr/local/bin/git-credential-manager-core ]
if [ -L /usr/local/bin/git-credential-manager ]
then
echo "Deleting symlink..."
rm /usr/local/bin/git-credential-manager-core
rm /usr/local/bin/git-credential-manager
else
echo "No symlink found."
fi
Expand Down
Loading

0 comments on commit a34ee31

Please sign in to comment.