百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

git-remote-s3

> 开发工具
开源

将 git 仓库推送到/从 s3 存储桶中,使用 gpg 加密。

327 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

将 git 仓库推送到/从 s3 存储桶中,使用 gpg 加密。

Git Remote S3 Helper

Push and pull git repos to/from an s3 bucket. Uses gpg to encrypt the repo contents (but not branch names!) before sending to s3.

This likely most useful for small teams who don't want to host their own private repository, but still want to manage their own encryption. For example, my use case is periodically backing up a repo from a desktop and pull to a laptop to develop remotely.

Example Usage

Add a remote using the s3 transport:

bash
git remote add s3remote s3://my_bucket/prefix

And then you can push/pull to the remote as usual:

bash
git pull s3remote master

git push s3remote

Or even clone from s3:

bash
git clone s3://my_bucket/prefix

Installation

  • Put git-remote-s3 in your PATH
    • Download the latest release here, gunzip and put it in your PATH
    • Or, install using cargo: cargo install git-remote-s3
  • Make sure s3 credentials are setup
    • See here for details on how the rusoto library loads as credentials (similar to the aws command line).
  • Setup gpg
    • gpg encryption will be attempted using git config user.email as a recipient. You'll want to ensure you have public and private keys setup for this user.
    • Alternatively, you can set a list of space-delimited recipients using the remote..gpgRecipientsconfig.

Design Notes

Due to the eventual consistency behaviour of s3, the semantics of pushing are slightly different when pushing to a 'proper' git repository. An attempt is made to prevent non-force pushes that do not include the current head as an ancestor (as proper git repos do), but eventual consistency means this is not guaranteed. Its possible for multiple heads to exist for the same branch, in which case the clients consider the newest head to be the truth. All heads for a branch can be seen using git ls-remote - the latest (newest) head the have the branch's name; older head will be shown using the naming scheme: __. An old head is retained until a new head is pushed that includes the old head as an ancestor, at which point the old head is deleted. This prevents any data loss, but puts the burden on the user to manually merge in old branches.

Each branch is stored (after being bundled with git bundle and encrypted with gpg) on s3 using the key s3://bucket/prefix//.bundle. On average, a git push will incur two list, a put and a delete s3 operation. A git pull will incur a list and a get s3 operation.

Future improvements

  • A better way to notify the user there are multiple heads on s3.
    • Show warning when attempting to push/fetch and there are multiple heads for a branch?
  • Allow disabling gpg with remote..gpg
  • use gpg.program

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustcommand-line-toolgitgpggpg-encryption

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具