免互動安裝Git Credential Manager (User)、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Git.GCM -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Git.GCM -e --silentwinget uninstall --id Git.GCM -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 僅目前使用者
靜默安裝
gcmuser-win-x64-3.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
gcmuser-win-x64-3.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\git-credential-manager-user"- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{aa76d31d-432c-42ee-844c-bc0bc801cef3}}_is1
- 安裝資料夾
- %LocalAppData%\Programs\Git Credential Manager
64位元 · EXE(Inno Setup) · 所有使用者
靜默安裝
gcm-win-x64-3.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
gcm-win-x64-3.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\git-credential-manager-user"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{fdfae50a-1bc1-4ead-9228-1e1c275e8d12}}_is1
- 安裝資料夾
- %ProgramFiles%\Git Credential Manager
64位元 · ZIP
免安裝(可攜版)
ARM64 · EXE(Inno Setup) · 僅目前使用者
靜默安裝
gcmuser-win-arm64-3.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
gcmuser-win-arm64-3.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\git-credential-manager-user"- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{aa76d31d-432c-42ee-844c-bc0bc801cef3}}_is1
- 安裝資料夾
- %LocalAppData%\Programs\Git Credential Manager
ARM64 · EXE(Inno Setup) · 所有使用者
靜默安裝
gcm-win-arm64-3.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
gcm-win-arm64-3.0.1.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\git-credential-manager-user"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{fdfae50a-1bc1-4ead-9228-1e1c275e8d12}}_is1
- 安裝資料夾
- %ProgramFiles%\Git Credential Manager
ARM64 · ZIP
免安裝(可攜版)
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-git-credential-manager-user.ps1
$url = 'https://github.com/git-ecosystem/git-credential-manager/releases/download/v3.0.1/gcmuser-win-x64-3.0.1.exe'
$sha256 = '723F9E13C360D56F9B0DFDB0609B4EDD8A28C0B33ECCB4DE900039EA56B3517A'
$file = Join-Path $env:TEMP 'gcmuser-win-x64-3.0.1.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-git-credential-manager-user.ps1
$url = 'https://github.com/git-ecosystem/git-credential-manager/releases/download/v3.0.1/gcm-win-x64-3.0.1.exe'
$sha256 = 'B2DC87F5DEB70DD605ECA646E987EC9841CD7BE74453C6E3066AC50BB3D3C98B'
$file = Join-Path $env:TEMP 'gcm-win-x64-3.0.1.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-git-credential-manager-user.ps1
$url = 'https://github.com/git-ecosystem/git-credential-manager/releases/download/v3.0.1/gcmuser-win-arm64-3.0.1.exe'
$sha256 = '9BADD7B738C6687BC01E5DF2D5B637A709AFEFAE99D8C792A52843624197225D'
$file = Join-Path $env:TEMP 'gcmuser-win-arm64-3.0.1.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-git-credential-manager-user.ps1
$url = 'https://github.com/git-ecosystem/git-credential-manager/releases/download/v3.0.1/gcm-win-arm64-3.0.1.exe'
$sha256 = '704E5EA8BC5AF3DF2E3CF6228893B39673843A6BE8C30B4F6FC57C3D817C871E'
$file = Join-Path $env:TEMP 'gcm-win-arm64-3.0.1.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait