# 使用 Homebrew, apk, dnf, zypper 安装 git-credential-libsecret

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install git-credential-libsecret
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

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

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

- dnf (92%):

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

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

- zypper (92%):

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

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

## 软件包事实

- **软件包键:** brew:git-credential-libsecret
- **软件包管理器:** Homebrew
- **版本:** 2.55.0
- **来源摘要:** Git helper for accessing credentials via libsecret
- **主页:** <https://git-scm.com>
- **仓库:** <https://github.com/git/git>
- **最后更新:** 2026-06-29T20:54:53Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- git-credential-libsecret (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

git-credential-libsecret is Git's Linux Secret Service credential helper. It lets Git store and retrieve HTTPS credentials through libsecret-backed wallets such as GNOME Keyring or KDE Wallet instead of keeping long-lived credentials in plaintext files.

### 项目历史

The helper entered Git's contrib area in 2016. Its initial Git commit describes it as based on the earlier GNOME Keyring helper, replacing the deprecated, GNOME-specific libgnome-keyring library with libsecret and the XDG Secret Service API.

Later Git-side changes kept the helper aligned with Git's credential protocol. A 2017 change made it unlock locked secrets through the Secret Service interface, and 2023 changes added storage for password expiry and OAuth refresh-token attributes while preserving compatibility with older stored credentials.

### 采用历史

Git's credential-helper documentation lists git-credential-libsecret alongside macOS Keychain and Windows Credential Manager as the Linux secure persistent storage option. That placement made it part of the standard Git credential-helper ecosystem rather than a standalone password-manager integration.

Linux package managers expose it as a separate package because the helper depends on libsecret and desktop secret-service libraries that are not always part of a minimal Git build.

### 使用方式

Practitioners configure it through Git's `credential.helper` setting, usually in `~/.gitconfig`, `$XDG_CONFIG_HOME/git/config`, or a repository `.git/config`. After configuration, Git invokes `git credential-libsecret` through the credential-helper protocol during HTTP authentication.

Its use case is workstation Git over HTTPS: the first authentication stores a username and password, personal access token, or generated token in the desktop secret service, and later fetch, pull, and push operations retrieve it without prompting.

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

For package maintainers, git-credential-libsecret is a small but important split from the main Git package. It is tied to desktop-secret-service dependencies, so distributing it separately keeps headless or minimal Git installs lean while giving Linux desktop users OS-integrated credential storage.

It also illustrates Git's extension model: a helper in `contrib/credential` can become a distro-facing executable without changing Git's core credential protocol.

### 时间线

- 2016: Git adds `contrib/credential/libsecret` as a libsecret replacement for the GNOME Keyring helper.
- 2017: The helper learns to unlock locked Secret Service items when reading credentials.
- 2023: The helper stores Git credential attributes such as password expiry and OAuth refresh tokens in a backwards-compatible secret format.
- 2025: Git fixes compilation of the libsecret helper in contrib.

### Related projects

- git-credential-cache and git-credential-store are Git's built-in generic helpers; libsecret fills the Linux secure-storage role.
- git-credential-osxkeychain and git-credential-wincred are the analogous platform-specific helpers for macOS and Windows.
- Git Credential Manager and git-credential-oauth are related helpers that generate or manage credentials through broader authentication workflows.

### 来源

- <https://git-scm.com/doc/credential-helpers lists git-credential-libsecret as the Linux secure persistent storage helper.>
- <https://git-scm.com/docs/gitcredentials documents Git credential helpers, configuration, and helper invocation semantics.>
- <https://github.com/git/git documents the upstream Git source history for the libsecret helper.>


## 安全说明

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, $XDG_CONFIG_HOME/git/config, .git/config
## 其他软件包管理器记录

- apk - git-credential-libsecret - 2.55.0-r0: normalized package name match | Alpine Linux edge package indexes: git-credential-libsecret from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | libsecret-based credential helper | https://www.git-scm.com/
- dnf - git-credential-libsecret - 2.55.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: git-credential-libsecret from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Git helper for accessing credentials via libsecret | https://git-scm.com/
- zypper - git-credential-libsecret - 2.55.0-2.3: normalized package name match | openSUSE Tumbleweed package metadata: git-credential-libsecret from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Git credential backend using libsecret to access keyring | https://git-scm.com/


## Combined YAML source

View the package source record on GitHub. [combined/git-credential-libsecret.yml](https://github.com/mxcl/pkgdb/blob/main/combined/git-credential-libsecret.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
