{"id":16843846,"url":"https://github.com/jonasmalacofilho/git-cache-http-server","last_synced_at":"2025-07-11T00:10:00.666Z","repository":{"id":46594224,"uuid":"46635808","full_name":"jonasmalacofilho/git-cache-http-server","owner":"jonasmalacofilho","description":"A caching Git HTTP server","archived":false,"fork":false,"pushed_at":"2024-04-19T15:18:51.000Z","size":139,"stargazers_count":89,"open_issues_count":10,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-08T15:19:24.559Z","etag":null,"topics":["cache","git"],"latest_commit_sha":null,"homepage":"","language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonasmalacofilho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2015-11-21T22:03:38.000Z","updated_at":"2025-06-05T09:37:36.000Z","dependencies_parsed_at":"2024-10-25T18:41:02.749Z","dependency_job_id":"1887ce4e-16f8-420f-86c6-38413a72c61c","html_url":"https://github.com/jonasmalacofilho/git-cache-http-server","commit_stats":{"total_commits":40,"total_committers":9,"mean_commits":4.444444444444445,"dds":0.625,"last_synced_commit":"e22660e40203ffe4a3f24ebba616529d92a6d085"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jonasmalacofilho/git-cache-http-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasmalacofilho%2Fgit-cache-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasmalacofilho%2Fgit-cache-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasmalacofilho%2Fgit-cache-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasmalacofilho%2Fgit-cache-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasmalacofilho","download_url":"https://codeload.github.com/jonasmalacofilho/git-cache-http-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasmalacofilho%2Fgit-cache-http-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264696511,"owners_count":23650937,"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":["cache","git"],"created_at":"2024-10-13T12:53:48.572Z","updated_at":"2025-07-11T00:10:00.649Z","avatar_url":"https://github.com/jonasmalacofilho.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"A caching Git HTTP server\n============================\n\nMirror remote repositories and serve them over HTTP, automatically updating\nthem as needed.\n\nCurrently supported client operations are fetch and clone.  Authentication to\nthe upstream repository is always enforced (for now, only HTTP Basic is\nsupported), but public repositories can be used as well.\n\n# Usage\n\n```\nUsage:\n  git-cache-http-server.js [options]\n\nOptions:\n  -c,--cache-dir \u003cpath\u003e   Location of the git cache [default: /var/cache/git]\n  -p,--port \u003cport\u003e        Bind to port [default: 8080]\n  -h,--help               Print this message\n  --version               Print the current version\n```\n\nThe upstream remote is extracted from the URL, taking the first component as\nthe remote hostname.\n\nExample:\n\n```\ngit-cache-http-server --port 1234 --cache-dir /tmp/cache/git \u0026\ngit clone http://localhost:1234/github.com/jonasmalacofilho/git-cache-http-server\n```\n\nIf you run your git-cache on a dedicated server or container (i.e. named\ngitcache), you can then also configure git to always use your cache like in the\nfollowing example (don't use this configuration on the git-cache machine\nitself):.\n\n```\ngit config --global url.\"http://gitcache:1234/\".insteadOf https://\n```\n\n# Installing\n\nRequirements: `nodejs` and `git`.\n\n```\nnpm install --global git-cache-http-server\n```\n\nTo install a cache service on Linux systems, check the example\n`doc/git-cache-http-server.service` unit file.\n\nFor Systemd init users that file should not require major tweaks, other than\nspecifying a different than default port number or cache directory.  After\ninstalled in the proper Systemd unit path for your distribution:\n\n```\nsystemctl daemon-reload\nsystemctl start git-cache-http-server\nsystemctl enable git-cache-http-server\n```\n\n# Working with the Haxe sources\n\nTo modify the code or use the latest features and fixes, it is necessary to\nbuild the Haxe sources in `src/`.\n\nThe process of installing Haxe, any additional dependencies, and building the\nproject has been automated with the use of a `prepare` script, and should work\ntransparently with the usual npm commands.  The resulting JS script will be\nplaced in `bin/`.\n\n```\n# clone the repository (adjust the protocol)\ngit clone https://github.com/jonasmalacofilho/git-cache-http-server\n\n# install development dependencies and build the sources\nnpm install\n\n# install the built code globally (might require sudo)\nnpm install --global\n```\n\nAdditionally, the following scripts are available should there be a need to\nupdate the Haxe dependencies or quickly rebuild the Haxe code alone:\n\n```\nnpm run installHaxelibs\nnpm run build\n```\n\nNote: after upgrading it might be necessary to purge old `.haxelib` and\n`node_modules` directories, as well any remaining of old installations.\n\n# Implementation\n\nThe current implementation is somewhat oversimplified; any help in improving it\nis greatly appreciated!\n\nReferences:\n\n - [Transfer protocols on the Git Book](http://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols)\n - [Git documentation on the HTTP transfer protocols](https://github.com/git/git/blob/master/Documentation/technical/http-protocol.txt)\n - [Source code for the GitLab workhorse](https://gitlab.com/gitlab-org/gitlab-workhorse/blob/master/handlers.go)\n - [Source code for `git-http-backend`](https://github.com/git/git/blob/master/http-backend.c)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasmalacofilho%2Fgit-cache-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasmalacofilho%2Fgit-cache-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasmalacofilho%2Fgit-cache-http-server/lists"}