# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 git-credential-oauth

查看 git-credential-oauth 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:git-credential-oauth
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install git-credential-oauth
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install git-credential-oauth
```

  证据: MacPorts ports tree: security/git-credential-oauth/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add git-credential-oauth
```

  证据: Alpine Linux edge package indexes: git-credential-oauth from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install git-credential-oauth
```

  证据: Debian stable package indexes: git-credential-oauth from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install git-credential-oauth
```

  证据: Fedora Rawhide package metadata: git-credential-oauth from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#git-credential-oauth
```

  证据: nixpkgs package indexes: pkgs/by-name/gi/git-credential-oauth/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S git-credential-oauth
```

  证据: Arch Linux sync databases: git-credential-oauth from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install git-credential-oauth
```

  证据: openSUSE Tumbleweed package metadata: git-credential-oauth from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/git-credential-oauth
```

  证据: Scoop official bucket manifest trees: bucket/git-credential-oauth.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id hickford.git-credential-oauth -e
```

  证据: Windows Package Manager source index: hickford.git-credential-oauth from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:git-credential-oauth
- **软件包管理器:** Homebrew
- **版本:** 0.17.2
- **来源摘要:** Git credential helper that authenticates in browser using OAuth
- **主页:** <https://github.com/hickford/git-credential-oauth>
- **仓库:** <https://github.com/hickford/git-credential-oauth>
- **最后更新:** 2026-07-29T16:05:01+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- git-credential-oauth (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.17.2
## 项目历史与用法

git-credential-oauth is a Go-based Git credential helper that obtains Git host credentials through browser-based OAuth or OAuth device flow. It targets HTTPS Git workflows where passwords, personal access tokens, or SSH setup are awkward for users or hard for distributions to package cleanly.

### 项目历史

The upstream repository began in October 2022 and tagged v0.0.1 the next day with GoReleaser packaging. Early 2022 and 2023 releases added support for more forges, custom host configuration, custom OAuth authorization and token URLs, and platform-specific browser opening.

The project later grew around Git's evolving credential protocol. In 2023 it added token refresh support, and Git's own credential documentation later listed git-credential-oauth as a popular OAuth helper alongside Git Credential Manager.

### 采用历史

The README emphasizes packaging as a design goal: binaries are available from upstream releases, Linux distributions package it, Homebrew and MacPorts cover macOS installs, winget covers Windows, and Go users can install from the module path.

Its adoption niche is clearest on Linux, where the README contrasts it with Git Credential Manager's broader feature set and heavier .NET packaging footprint. The helper is deliberately narrow: it generates credentials and composes with storage helpers such as cache, osxkeychain, wincred, or libsecret.

### 使用方式

A typical setup runs `git credential-oauth configure` or adds `helper = oauth` after a storage helper in `~/.gitconfig`. Git then asks storage helpers first and falls through to the OAuth helper only when it needs a fresh credential.

Users authenticate to hosts such as GitHub, GitLab, Bitbucket, Gerrit, Gitea, Forgejo, or googlesource by browser flow. On systems without a browser, the README documents `oauth -device` for OAuth device flow where supported.

### 为什么软件包爱好者会关心

git-credential-oauth matters in package-manager culture because it is a small credential-generating helper with a simple Go build, cross-platform binaries, and distribution packages. It gives Unix users a lightweight alternative to large credential managers while still fitting Git's helper chain.

It also shows a post-password Git authentication pattern: package a helper that can mint host tokens, then rely on Git's existing storage helpers to persist them.

### 时间线

- 2022: The repository begins and v0.0.1 is tagged with GoReleaser packaging.
- 2023: v0.2.0 adds custom host configuration.
- 2023: v0.7.0 adds token refresh support.
- 2024: v0.13.x adds OAuth device-flow configuration keys.
- 2025: v0.16.0 adds dark-mode support for the authentication page.
- 2026: v0.17.x adds Forgejo recognition and device-flow configuration fixes.

### Related projects

- Git Credential Manager is the broader credential-manager project compared in the README.
- git-credential-cache, git-credential-libsecret, git-credential-osxkeychain, and git-credential-wincred are common storage helpers used before git-credential-oauth in Git's helper list.
- git-credential-azure is a related Hickford helper for Azure Repos authentication.

### 来源

- <https://git-scm.com/docs/gitcredentials documents Git's helper chain and names git-credential-oauth as a popular OAuth helper.>
- <https://github.com/hickford/git-credential-oauth documents the motivation, supported hosts, installation, configuration, comparison with Git Credential Manager, and design philosophy.>
- <https://github.com/hickford/git-credential-oauth/releases documents tagged release progression.>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.gitconfig
## 其他软件包管理器记录

- Debian apt - git-credential-oauth - 0.15.0-1+b2: normalized package name match | Debian stable package indexes: git-credential-oauth from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Git credential helper for GitHub and other forges using OAuth | https://github.com/hickford/git-credential-oauth
- Nix - git-credential-oauth: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/git-credential-oauth/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - git-credential-oauth - 0.11.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: git-credential-oauth from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Git credential helper for GitHub and other forges using OAuth | https://github.com/hickford/git-credential-oauth
- apk - git-credential-oauth - 0.15.1-r11: normalized package name match | Alpine Linux edge package indexes: git-credential-oauth from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Git credential helper that securely authenticates to GitHub, GitLab and BitBucket using OAuth | https://github.com/hickford/git-credential-oauth
- apk - git-credential-oauth-doc - 0.15.1-r11: normalized package name match | Alpine Linux edge package indexes: git-credential-oauth-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Git credential helper that securely authenticates to GitHub, GitLab and BitBucket using OAuth (documentation) | https://github.com/hickford/git-credential-oauth
- dnf - git-credential-oauth - 0.17.2-5.fc45: normalized package name match | Fedora Rawhide package metadata: git-credential-oauth from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A Git credential helper that securely authenticates to GitHub, GitLab and BitBucket using OAuth | https://github.com/hickford/git-credential-oauth
- pacman - git-credential-oauth - 0.17.2-2: normalized package name match | Arch Linux sync databases: git-credential-oauth from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Git credential helper that securely authenticates to GitHub, GitLab, BitBucket, Gerrit and other forges using OAuth | https://github.com/hickford/git-credential-oauth
- zypper - git-credential-oauth - 0.17.2-1.7: normalized package name match | openSUSE Tumbleweed package metadata: git-credential-oauth from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Git credential helper that authenticates to GitHub and other forges using OAuth | https://github.com/hickford/git-credential-oauth
- MacPorts - git-credential-oauth: normalized package name match | MacPorts ports tree: security/git-credential-oauth/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/git-credential-oauth: normalized package name match | Scoop official bucket manifest trees: bucket/git-credential-oauth.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - hickford.git-credential-oauth: normalized package name match | Windows Package Manager source index: hickford.git-credential-oauth from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/git-credential-oauth.yml](https://github.com/mxcl/pkgdb/blob/main/combined/git-credential-oauth.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
