From 9ddc046f89fedf1951ac4f628b4890a63a926a9b Mon Sep 17 00:00:00 2001 From: setstack <89508174+setstack@users.noreply.github.com> Date: Mon, 12 Jan 2026 08:38:47 +1100 Subject: [PATCH 1/4] feat: docker support --- dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 dockerfile diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..3d36855 --- /dev/null +++ b/dockerfile @@ -0,0 +1,19 @@ +FROM python:3.11-slim + +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 + +WORKDIR /app + +RUN apt-get update && apt-get install -y \ + git \ + build-essential \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt . +RUN pip install --upgrade pip \ + && pip install -r requirements.txt + +COPY . . + +CMD ["python", "main.py"] \ No newline at end of file From c21a64346858187b015afb1392be4b4ad4aaa5ac Mon Sep 17 00:00:00 2001 From: setstack <89508174+setstack@users.noreply.github.com> Date: Mon, 12 Jan 2026 08:42:52 +1100 Subject: [PATCH 2/4] patch: error handling for weird usernames --- gitfive/lib/xray.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitfive/lib/xray.py b/gitfive/lib/xray.py index 659d954..4ee88d0 100644 --- a/gitfive/lib/xray.py +++ b/gitfive/lib/xray.py @@ -359,4 +359,7 @@ async def analyze_ext_contribs(runner: GitfiveRunner): if not name in runner.target.usernames_history[username]["names"]: runner.target._add_name(name) # Previous names are valid informations (unless target spoof it) runner.target.usernames_history[username]["names"][name] = {"repos": set()} - runner.target.usernames_history[username]["names"][name]["repos"].add(repo_name) \ No newline at end of file + try: + runner.target.usernames_history[username]["names"][name]["repos"].add(repo_name) + except KeyError as error: + continue From 40359c13210a4d65e1321bc576d544271316e3a4 Mon Sep 17 00:00:00 2001 From: setstack <89508174+setstack@users.noreply.github.com> Date: Mon, 12 Jan 2026 09:09:31 +1100 Subject: [PATCH 3/4] feat: docker instructions in README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 2747b9c..92bff8e 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,17 @@ $ pipx install gitfive ``` It will automatically use venvs to avoid dependency conflicts with other projects. +## Docker + +```bash +$ docker build -t gitfive:latest . +$ docker run -it --name gitfive gitfive:latest python3 main.py login +$ docker start gitfive +$ docker exec -it gitfive python3 main.py user +``` + +**Note:** Using a named container (`--name gitfive`) allows you to persist credentials between runs. The `-it` flags are required for interactive input (login prompts). Use `docker start gitfive` to start the container, then `docker exec -it gitfive` to run commands in it. + # Usage First, login to GitHub *(preferably with a secondary account)* : ```bash From 15a1eaebebead530d37483bfc1d099c8610557a1 Mon Sep 17 00:00:00 2001 From: setstack <89508174+setstack@users.noreply.github.com> Date: Mon, 12 Jan 2026 09:09:47 +1100 Subject: [PATCH 4/4] patch: bug for repos in a werid state --- gitfive/lib/xray.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gitfive/lib/xray.py b/gitfive/lib/xray.py index 4ee88d0..d016e67 100644 --- a/gitfive/lib/xray.py +++ b/gitfive/lib/xray.py @@ -42,9 +42,20 @@ def get_repo(token: str, target_username: str, target_id: int, repos_folder: Pat # Repo example to git clone : https://github.com/novitae/Aet-s-Tools - pass # In fact, it fails to checkout but commits are cloned, so we don't care. 💅 - - repo = Repo(repo_path) + # Check if repo_path exists (clone might have partially succeeded) + if not repo_path.exists(): + # Clone completely failed (e.g., disabled repo, 403 error, etc.) + return results + # In fact, it fails to checkout but commits are cloned, so we don't care. + repo = Repo(repo_path) + else: + # Other GitCommandError (e.g., 403 Forbidden for disabled repos) + # Return empty results if clone completely failed + return results + except Exception as error: + # Catch any other exceptions (e.g., NoSuchPathError if path doesn't exist) + # Return empty results if we can't access the repo + return results if not repo.refs: # Empty repo, no branch