transparency-dev / transparency-dev/incubator

Poor error message when vindex/cmd/sumdbverify encounters a git repository with unexpected owner

Open
#69 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
4
Forks
6
Avg merge
3d 23h
Merged PRs (30d)
3

Description

I was trying github.com/transparency-dev/incubator/vindex/cmd/sumdbverify@main --mod_root /host in a container, where /host was a read-only mount of a git checkout on the container host. In this setup, I had an ownership mismatch, and I got somewhat confusing error messaged from sumdbverify: failed to create zip file: create zip from version control system /host: could not find a recognized version control system at "/host".

When I ran git directly, e.g., (cd /host && git log) I got a better error message that explained the problem

fatal: detected dubious ownership in repository at '/host'
To add an exception for this directory, call:

        git config --global --add safe.directory /host

It would be nice if the sumdbverify error reporting mentioned unexpected ownership, rather than telling me that there's no git repository.

(And running the suggested git config command solved the problem, and made sumdbverify happy).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the vindex/cmd/sumdbverify command and reproduce the failure against a read-only git checkout with an ownership mismatch. Trace how the git error becomes the reported “could not find a recognized version control system” message; done means unexpected ownership is reported clearly while other repository-detection errors remain understandable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.