{"id":19589664,"url":"https://github.com/flolu/git-gcrypt","last_synced_at":"2025-04-27T12:32:42.329Z","repository":{"id":119944374,"uuid":"587785067","full_name":"flolu/git-gcrypt","owner":"flolu","description":"Guide to using encrypted Git remotes with the help of git-remote-gcrypt","archived":false,"fork":false,"pushed_at":"2023-12-16T13:15:23.000Z","size":5,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T00:24:06.623Z","etag":null,"topics":["encryption","gcrypt","git","git-remote-gcrypt","gnupg","gpg"],"latest_commit_sha":null,"homepage":"https://youtu.be/XdoTca3EQGU","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flolu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-11T15:26:14.000Z","updated_at":"2025-04-04T18:49:35.000Z","dependencies_parsed_at":"2023-11-18T20:27:33.478Z","dependency_job_id":"aca2fc09-e686-456f-aeb8-c8fd9c8573d7","html_url":"https://github.com/flolu/git-gcrypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fgit-gcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fgit-gcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fgit-gcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fgit-gcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flolu","download_url":"https://codeload.github.com/flolu/git-gcrypt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251138933,"owners_count":21541976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encryption","gcrypt","git","git-remote-gcrypt","gnupg","gpg"],"created_at":"2024-11-11T08:20:09.100Z","updated_at":"2025-04-27T12:32:42.066Z","avatar_url":"https://github.com/flolu.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eEncrypt Git Repositories\u003c/h1\u003e\n  \u003cp\u003eGuide to using encrypted Git remotes with the help of git-remote-gcrypt\u003c/p\u003e\n  \u003ca href=\"https://youtu.be/XdoTca3EQGU\"\u003e\n    \u003cimg width=\"320px\" height=\"180px\" src=\"https://i.ytimg.com/vi/XdoTca3EQGU/maxresdefault.jpg\" style=\"border-radius: 1rem;\" /\u003e\n    \u003cp\u003eWatch the YouTube Tutorial\u003c/p\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## Requirements\n\n- [Git](https://git-scm.com)\n- [git-remote-gcrypt](https://spwhitton.name/tech/code/git-remote-gcrypt)\n- [GnuPG](https://gnupg.org)\n\n## Install requirements\n\n**Debian**\n\n```\napt install git git-remote-gcrypt gnupg\n```\n\n**Fedora**\n\n```\ndnf install git git-remote-gcrypt gnupg\n```\n\n**Arch**\n\n```\npacman -S install git git-remote-gcrypt gnupg\n```\n\n## Usage\n\n\u003e Read the git-remote-gcrypt [documentation](https://github.com/spwhitton/git-remote-gcrypt) for more details\n\n**1. Setup GnuPG key**\n\nIf you don't already have a GnuPG key, then you need to generate one:\n\n```\ngpg --full-gen-key\n```\n\nYou can list all of your GnuGP keys with:\n\n```\ngpg --list-keys\n```\n\n**2. Backup your GnuPG key**\n\n\u003e I highly recommend to backup your GnuPG securely. Because loosing your GnuPG key also means loosing access to your encrypted Git remote!\n\nYou can obtain your key's fingerprint by running:\n\n```\ngpg --list-keys\n```\n\nThen, to backup your GnuPG key, run the command below and store the `private.gpg` file securely:\n\n```\ngpg -o private.gpg --export-options backup --export-secret-keys \u003cgpg_key_fingerprint\u003e\n```\n\nTo restore you GnuPG you can use this command:\n\n```\ngpg --import-options restore --import private.gpg\n```\n\n**3. Add encrypted remote**\n\nTo add an encrypted remote, you simply have to prefix the remote url with `gcrypt::`, for instance:\n\n```\ngit remote add origin gcrypt::https://github.com/flolu/encrypted\n```\n\n**4. Configure encryption**\n\nYou also need to specify which GnuPG keys can encrypt and decrypt this remote:\n\n```bash\ngit config remote.origin.gcrypt-participants \"\u003ckey_fingerprint\u003e\"\n```\n\nLastly, you have to specify the GnuPG used for encryption\n\n```bash\ngit config --global user.signingkey \"\u003ckey_fingerprint\u003e\"\n```\n\n**5. Push changes to remote**\n\nNow you can make commits and upload the changes to the encrypted remote as usual:\n\n\u003e Since git-remote-gcrypt uses `--force` to push changes, always make sure to run `git pull` first!\n\n```\ngit push origin master\n```\n\n\u003e On macOS, you might have to add `export GPG_TTY=$(tty)` to your `.zshrc` file to accept password inputs to access your private GnuPG key.\n\n**6. Pull changes from remote**\n\nCloning an encrypted Git remote also works as usual. You just have to prefix the remote url with `gcrypt::`. You also need to have access to your GnuPG for decryption.\n\n```\ngit clone gcrypt::\u003cremote_url\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflolu%2Fgit-gcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflolu%2Fgit-gcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflolu%2Fgit-gcrypt/lists"}