{"id":37215103,"url":"https://github.com/jarpsimoes/git-http-server","last_synced_at":"2026-01-15T00:53:15.270Z","repository":{"id":50266527,"uuid":"518638954","full_name":"jarpsimoes/git-http-server","owner":"jarpsimoes","description":"HTTP Server from git","archived":false,"fork":false,"pushed_at":"2023-12-27T15:12:17.000Z","size":3854,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T10:23:37.845Z","etag":null,"topics":["docker","docker-type","github","go","golang","html","html-server","kubernetes","published","published-golang","server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jarpsimoes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-07-27T23:27:48.000Z","updated_at":"2023-03-28T16:28:55.000Z","dependencies_parsed_at":"2023-11-23T15:29:15.531Z","dependency_job_id":"83bd431c-6891-4a12-926c-0244e0b92fa8","html_url":"https://github.com/jarpsimoes/git-http-server","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jarpsimoes/git-http-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarpsimoes%2Fgit-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarpsimoes%2Fgit-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarpsimoes%2Fgit-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarpsimoes%2Fgit-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarpsimoes","download_url":"https://codeload.github.com/jarpsimoes/git-http-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarpsimoes%2Fgit-http-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28440631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:34:46.850Z","status":"ssl_error","status_checked_at":"2026-01-15T00:34:46.551Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","docker-type","github","go","golang","html","html-server","kubernetes","published","published-golang","server"],"created_at":"2026-01-15T00:53:14.795Z","updated_at":"2026-01-15T00:53:15.258Z","avatar_url":"https://github.com/jarpsimoes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GIT-HttpServer\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b0fde431e29c4e3ba47560a973279fef)](https://www.codacy.com/gh/jarpsimoes/git-http-server/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=jarpsimoes/git-http-server\u0026amp;utm_campaign=Badge_Grade)\n[![codecov](https://codecov.io/gh/jarpsimoes/git-http-server/branch/main/graph/badge.svg?token=CCRRRCYLM1)](https://codecov.io/gh/jarpsimoes/git-http-server)\n\nThis is a simple HTTP server to provide \"NoOps\" to the frontend applications.\nThe content must be provided from a git repository. \n\nEvery times an application is started, the configured repository is cloned on \nselected branch (in variable REPO_BRANCH) and can be pulled new version on defined PATH_PULL.\n\n## RELEASE NOTES: v0.0.3-alpha\n\n| Feature | Description                                                                                                        |\n|---------|--------------------------------------------------------------------------------------------------------------------|\n| Done    | Add support to proxy redirect with HTTPS backends                                                                  |\n| Done    | Add CodeQL definitions                                                                                             |\n| FIXED   | Bump golang.org/x/text from 0.3.7 to 0.3.8                                                                         |\n| FIXED   | Bump github.com/stretchr/testify from 1.7.0 to 1.7.1                                                               |\n| FIXED   | Bump golang.org/x/sys from 0.0.0-20220209214540-3681064d5158 to 0.1.0                                              |\n| FIXED   | Bump golang.org/x/crypto from 0.0.0-20220214200702-86341886e292 to 0.1.0                                           |\n| FIXED   | Bump golang.org/x/net from 0.0.0-20220127200216-cd36cc0744dd to 0.17.0 in                                          |\n| FIXED   | Vulnerability issue Uncontrolled data used in path [Issue](https://github.com/jarpsimoes/git-http-server/issues/8) |\n| FIXED   | Root path issue                                                                                                    |\n\n## Authentication Methods\n\nThe GIT-HttpServer only support basic authentication on repositories by protocol HTTPS\n\n## Configuration\n\n### Environment Variables\n| Name                      | Description                                                            | Default                                           | Mandatory |\n|---------------------------|------------------------------------------------------------------------|---------------------------------------------------|-----------|\n| PATH_CLONE                | Set clone path                                                         | _clone                                            | Yes       |\n| PATH_PULL                 | Set pull path                                                          | _pull                                             | Yes       |\n| PATH_VERSION              | Set get git commit version path                                        | _version                                          | Yes       |\n| PATH_WEBHOOK              | Set webhook path                                                       | _hook                                             | Yes       |\n| PATH_HEALTH               | Set health check path                                                  | _health                                           | Yes       |\n| REPO_BRANCH               | Set default branch to clone content                                    | main                                              | No        |\n| REPO_TARGET_FOLDER        | Set folder to clone source (only allowed letters, numbers, underscore) | target-git                                        | No        |\n| REPO_URL                  | Set url as a source origin                                             | https://github.com/jarpsimoes/git-http-server.git | No        |\n| REPO_USERNAME             | Set username or token identifier to basic authentication               | N/D                                               | No        |\n| REPO_PASSWORD             | Set password or token to basic authentication                          | N/D                                               | No        |\n| HTTP_PORT                 | Set port to expose content                                             | 8081                                              | Yes       |\n| GHS_CUSTOM_PATH_\u003cpath\u003e    | Custom path to work as a proxy server                                  | N/D                                               | No        |\n| GHS_CUSTOM_REWRITE_\u003cpath\u003e | Set to remove from proxy request base path                             | N/D                                               | No        |\n| FOLDER_ROOT **(Removed)** | The base path will be always root folder of the application            | REMOVED                                           | N/D       |\n\n\n## Implementation\n\n### Simple implementation\n\nThe most simple implementation of git-http-server\n```shell\n$ docker run \\ \n    -p 8081:8081 \\\n    -e REPO_URL=[URL REPOSITORY] \\\n    -e REPO_BRANCH=[DEFAULT BRANCH] \\\n    ghcr.io/jarpsimoes/git_http_server\n```\nTest content\n```shell\n$ curl http://localhost:8080\n```\n\nUpdate Repository\n````shell\n$ curl http://localhost:8080/_pull\n````\n\n### Implementation only as a http server ([To support angular operator](https://github.com/jarpsimoes/git-http-server-operator))\n\n```shell\n$ docker run \\ \n    -p 8081:8081 \\\n    -e REPO_URL=\"\" \\\n    ghcr.io/jarpsimoes/git_http_server\n```\n\n\n### Implementation with Basic Authentication\n\nThe implementation with basic authentication can be used with username and password method, or PAT(Personal Access Token) method (like Gitlab Token).\nFor the PAT approach the username is Token Identifier and Password is token.\n\n```shell\n$ docker run \\ \n    -p 8081:8081 \\\n    -e REPO_URL=[URL REPOSITORY] \\\n    -e REPO_BRANCH=[DEFAULT BRANCH] \\\n    -e REPO_USERNAME=[Token Identifier or Username] \\\n    -e REPO_PASSWORD=[Password or Token]\n    ghcr.io/jarpsimoes/git_http_server\n```\n\n### Implementation with Proxy redirect\n\nGit Http Server support routes to redirect for another URL. Should be defined path to redirect and target. \nThe environment variables must be defined as bellow:\n\n- GHS_CUSTOM_PATH_example/path/redirect: \"https://example.org\"\n- GHS_CUSTOM_REWRITE_example/path/redirect: true # If you need remove the \"example/path/redirect\" from the proxy request must be defined:\n\n```shell\n$ docker run \\ \n    -p 8081:8081 \\\n    -e REPO_URL=[URL REPOSITORY] \\\n    -e REPO_BRANCH=[DEFAULT BRANCH] \\\n    -e REPO_USERNAME=[Token Identifier or Username] \\\n    -e REPO_PASSWORD=[Password or Token] \\\n    -e GHS_CUSTOM_PATH_google/redirect=https://www.google.pt\n    -e GHS_CUSTOM_REWRITE_google/redirect=true\n    ghcr.io/jarpsimoes/git_http_server\n```\n\nTest content\n```shell\n$ curl http://localhost:8080\n```\n\nUpdate Repository\n````shell\n$ curl http://localhost:8080/_health\n````\n\n### Kubernetes implementation\n\nThe git-http-server is Kubernetes Ready, can be deployed as simple deployment. See bellow an example of kubernetes deployment.\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: simple-content-deployment\nspec:\n  replicas: 1\n  strategy:\n    type: RollingUpdate\n  selector:\n    matchLabels:\n      app: git-http-server-example-1\n  template:\n    metadata:\n      labels:\n        app: git-http-server-example-1\n    spec:\n      containers:\n        - ports:\n            - name: http\n              containerPort: 8081\n              protocol: TCP\n          resources:\n            limits: {}\n            requests: {}\n          env:\n            - name: REPO_URL\n              value: [REPOSITORY_URL]\n          name: git-http-server\n          image: ghcr.io/jarpsimoes/git_http_server:v0.0.1-beta\n          imagePullPolicy: Always\n          livenessProbe:\n            httpGet:\n              port: 8081\n              path: /_health\n            failureThreshold: 3\n            periodSeconds: 10\n          startupProbe:\n            httpGet:\n              port: 8081\n              path: /_health\n            failureThreshold: 3\n            periodSeconds: 10\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarpsimoes%2Fgit-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarpsimoes%2Fgit-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarpsimoes%2Fgit-http-server/lists"}