/git-repo-archive-api

API for archiving git repos.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Git Repo Archive API

Installation

To set up this application and create a virtual environment, follow these steps:

  1. Install pyenv by following the instructions in the official documentation.

  2. Create a virtual environment for this application using pyenv. Open your terminal and execute the following commands:

    pyenv install 3.11
    pyenv virtualenv 3.11 git-archive-api
    pyenv activate git-archive-api
  3. Install the required dependencies by running the following command:

    pip install -r requirements.txt

Run for Development

Run with reload enables

uvicorn app.api:app --reload --port 8080

or

python main.py

Usage

curl -X 'POST' \
  'http://127.0.0.1:8080/archives/?repo_url=https%3A%2F%2Fgithub.com%2Fjulianschelb%2Fvscode-theme-solarized-dark' \
  -H 'accept: application/json' \
  -d ''

Todo:

  • Avoid collisions of repository names
  • Return Git output in response (including errors)
  • Use a separate folder for (large) repositories which do not need to be updated
  • Functions for importing private keys into the Docker container