macOS
brew install libgit2local Homebrew formula metadata
sudo port install libgit2MacPorts ports tree · devel/libgit2/Portfile · ソース: api.github.com
brew
libgit2 のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install libgit2local Homebrew formula metadata
sudo port install libgit2MacPorts ports tree · devel/libgit2/Portfile · ソース: api.github.com
sudo apk add libgit2Alpine Linux edge package indexes · libgit2 · ソース: dl-cdn.alpinelinux.org
sudo dnf install libgit2Fedora Rawhide package metadata · libgit2 · ソース: dl.fedoraproject.org
nix profile install nixpkgs#libgit2nixpkgs package indexes · pkgs/by-name/li/libgit2/package.nix · ソース: api.github.com
sudo pacman -S libgit2Arch Linux sync databases · libgit2 · ソース: geo.mirror.pkgbuild.com
sudo apt install libgit2-1.9Debian stable package indexes · libgit2-1.9 · ソース: deb.debian.org
sudo apt install libgit2-1.7Ubuntu 24.04 LTS package indexes · libgit2-1.7 · ソース: archive.ubuntu.com
sudo zypper install libgit2-1_9openSUSE Tumbleweed package metadata · libgit2-1_9 · ソース: download.opensuse.org
概要
C library of Git core methods that is re-entrant and linkable
履歴
libgit2 is a portable C implementation of Git core methods as a re-entrant, linkable library. It became important because the original Git executable was not designed as an embeddable library, while editors, forges, desktop clients, hosting providers, and language bindings needed Git behavior inside long-running applications.
GitHub's 2010 project announcement describes libgit2 as started by Shawn Pearce a few years earlier, then revived through a Google Summer of Code project by Vicent Marti with Scott Chacon as mentor. The immediate motivation was practical: Git's own code called die() and was not re-entrant, so GUI, web, and scripting users often had to fork and parse the Git binary.
The upstream README describes libgit2 as a portable pure-C implementation with a solid API, usable from C directly and through bindings. By 2020, maintainer Edward Thomson announced libgit2 1.0 after many years of planning and bug fixing; by late 2024 maintainers were publicly discussing planned ABI/API changes for libgit2 2.0 and SHA-256 support.
libgit2's adoption followed the rise of Git as a developer platform rather than only a command-line tool. The upstream README says it is used by GUI clients, hosting providers, forges, utilities, and applications, with bindings for Ruby, .NET, Python, Node.js, Rust, and more.
Because it is a shared C library with many language bindings, package managers ship libgit2 as infrastructure for other packages. Its releases matter to downstreams when Git compatibility, transport security, SHA-1/SHA-256 behavior, or ABI stability changes.
Applications use libgit2 to open repositories, inspect objects and references, read and write commits, perform network operations, and embed Git workflows without shelling out to the Git CLI.
The library is especially attractive for IDEs, Git GUI clients, web services, and language ecosystems that want native bindings. The included git2 executable is secondary; the main value is the API surface.
libgit2 is one of the canonical examples of turning a famous CLI tool's behavior into a stable embeddable library. For package nerds, the interesting part is not just Git support; it is ABI management, language binding compatibility, bundled-versus-system crypto and SSH choices, and the long path to a 1.0 library release.
It also explains why some packages depend on libgit2 even when Git itself is installed: they need in-process repository operations and predictable APIs, not subprocess output.
セキュリティ状態
library-like package without higher-risk signals.
リスク グリーン · 信頼度 低 · appliance
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
git2 | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
https://github.com/libgit2/libgit2
インストールメタデータ
| パッケージキー | brew:libgit2 |
|---|---|
| バージョン | 1.9.4 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/libgit2 |
| ホームページ | https://libgit2.org/ |
| リポジトリ | https://github.com/libgit2/libgit2 |
| 上流ドキュメント | https://libgit2.org/docs |
| ライセンス | GPL-2.0-only WITH GCC-exception-2.0 |
| ソースアーカイブ | https://github.com/libgit2/libgit2/archive/refs/tags/v1.9.4.tar.gz |
| 最終更新 | 2026-05-22T13:50:55Z |
| Pulse | updated |
| 依存関係 | libssh2, llhttp |
| ビルド依存関係 | cmake, pkgconf |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定義 |
| サービス | 宣言なし |
レジストリ情報
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | libgit2 |
| Aliases |
|
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
ソースデータベース一致
一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。
libgit2-1.9 1.9.0+ds-2
low-level Git library
sudo apt install libgit2-1.9libgit2-dev 1.9.0+ds-2
low-level Git library (development files)
sudo apt install libgit2-devlibgit2-fixtures 1.9.0+ds-2
low-level Git library - test suite examples
sudo apt install libgit2-fixtureslibgit2
nix profile install nixpkgs#libgit2libgit2-1.7 1.7.2+ds-1ubuntu3
low-level Git library
sudo apt install libgit2-1.7libgit2-dev 1.7.2+ds-1ubuntu3
low-level Git library (development files)
sudo apt install libgit2-devlibgit2-fixtures 1.7.2+ds-1ubuntu3
low-level Git library - test suite examples
sudo apt install libgit2-fixtureslibgit2 1.9.4-r1
linkable library for Git
sudo apk add libgit2libgit2-dbg 1.9.4-r1
linkable library for Git (debug symbols)
sudo apk add libgit2-dbglibgit2-dev 1.9.4-r1
linkable library for Git (development files)
sudo apk add libgit2-devlibgit2-static 1.9.4-r1
linkable library for Git (static library)
sudo apk add libgit2-staticlibgit2-tests 1.9.4-r1
linkable library for Git (tests)
sudo apk add libgit2-testslibgit2-tools 1.9.4-r1
linkable library for Git (tools)
sudo apk add libgit2-toolslibgit2 1.9.4-1.fc45
C implementation of the Git core methods as a library with a solid API
sudo dnf install libgit2libgit2-devel 1.9.4-1.fc45
Development files for libgit2
sudo dnf install libgit2-devellibgit2 1:1.9.4-1
A linkable library for Git
https://github.com/libgit2/libgit2
sudo pacman -S libgit2ソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.