# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix 安装 git-secret

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

## 安装

```sh
sudo av install brew:git-secret
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install git-secret
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install git-secret
```

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

### Linux

- apk (92%):

```sh
sudo apk add git-secret
```

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

- Debian apt (92%):

```sh
sudo apt install git-secret
```

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

- dnf (92%):

```sh
sudo dnf install git-secret
```

  证据: Fedora Rawhide package metadata: git-secret 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-secret
```

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

## 软件包事实

- **软件包键:** brew:git-secret
- **软件包管理器:** Homebrew
- **版本:** 0.5.0
- **来源摘要:** Bash-tool to store the private data inside a git repo
- **主页:** <https://sobolevn.me/git-secret>
- **仓库:** <https://github.com/sobolevn/git-secret>
- **最后更新:** 2026-06-22T14:03:31-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- git-secret (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

git-secret is a Bash and GPG tool for storing encrypted private files inside a Git repository. It targets the deployment and configuration problem of keeping secrets versioned with code without committing plaintext values.

### 项目历史

The GitHub repository was created in 2016 by the sobolevn project, and the documentation frames the tool around GPG public-key access control. The command set grew around `init`, `tell`, `add`, `hide`, `reveal`, `cat`, and access-removal operations.

The changelog records steady hardening of a shell-based security tool: path mappings moved into `.gitsecret/paths/mapping.cfg`, modified-file hiding was added, FreeBSD and BusyBox support improved, Fedora packaging was noted, CI moved across platforms, and the 0.5.0 series added armored-output support and more robust permission handling.

### 采用历史

git-secret gained a broader footprint than many Git secret tools because it was packaged for Homebrew, Debian-family systems, Fedora/RPM workflows, Alpine, and other downstream repositories. Its documentation also includes CI/CD usage, which made it attractive for deployment pipelines that already rely on Git and GPG.

### 使用方式

Practitioners initialize `.gitsecret`, add trusted users' public keys with `git secret tell`, mark files with `git secret add`, encrypt them with `git secret hide`, and decrypt them with `git secret reveal` or `git secret cat`. Teams rotate access by removing a person from the keyring and re-encrypting files for the remaining recipients.

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

The package is significant because it is a portable shell implementation of repository-local secret sharing. It appeals to users who want encrypted files to travel with Git history and package managers rather than adopting an external secrets service.

### 时间线

- 2016: Public GitHub repository created.
- 0.2.3: `.gitsecret/paths/mapping.cfg` introduced for tracked secret path metadata.
- 0.2.6: Fedora package availability noted and FreeBSD/Windows testing work expanded.
- 0.3.0: BusyBox support and additional GPG behavior handling added.
- 0.5.0: Armored encrypted output and stronger key-directory permissions added.

### Related projects

- Related technologies include GnuPG, Git hooks, CI/CD secret injection, repository-local encrypted files, and other Git-centered secret-management tools.

### 来源

- <https://formulae.brew.sh/formula/git-secret>
- <https://github.com/sobolevn/git-secret>
- <https://raw.githubusercontent.com/sobolevn/git-secret/master/CHANGELOG.md>
- <https://raw.githubusercontent.com/sobolevn/git-secret/master/README.md>
- <https://sobolevn.me/git-secret/>
- <https://sobolevn.me/git-secret/installation.html>


## 安全说明

narrow executable package without higher-risk signals.

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

## 其他软件包管理器记录

- Debian apt - git-secret - 0.5.0-1: normalized package name match | Debian stable package indexes: git-secret from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | store encrypted credential inside source code git repository | https://github.com/sobolevn/git-secret
- Nix - git-secret: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/git-secret/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - git-secret - 0.5.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: git-secret from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | store encrypted credential inside source code git repository | https://github.com/sobolevn/git-secret
- apk - git-secret - 0.5.0-r0: normalized package name match | Alpine Linux edge package indexes: git-secret from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | A bash-tool to store your private data inside a git repository | https://git-secret.io/
- apk - git-secret-doc - 0.5.0-r0: normalized package name match | Alpine Linux edge package indexes: git-secret-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | A bash-tool to store your private data inside a git repository (documentation) | https://git-secret.io/
- dnf - git-secret - 0.5.0-11.fc45: normalized package name match | Fedora Rawhide package metadata: git-secret from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A bash-tool to store your private data inside a git repository | http://git-secret.io/
- MacPorts - git-secret: normalized package name match | MacPorts ports tree: devel/git-secret/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

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