Message codes: Git URLs¶
See also: Message codes (the index of every code) and Messages and codes (the line grammar, what a code guarantees and when to trust one).
Trust a code only when the line is one of the lines below, a value in place of
each <name>, after at most one prefix: the index lists the prefixes and
message-codes-values.md the values.
Codes¶
| Code | Level | Means | Since |
|---|---|---|---|
git-filter-unusable |
INFO | Pitloom fetches with a filter that leaves out large files the checkout does not need; the server answered it with an error (Azure DevOps: HTTP 400). | 0.25.0 |
git-link-unsafe |
INFO | The checkout holds symbolic links that lead outside the repository, into its .git directory, or to a folder. The repository is untrusted: following them would read files it does not hold, or walk a folder twice. | 0.25.0 |
git-missing |
ERROR | A Git URL is fetched by running git, and no git program is on PATH. | 0.25.0 |
git-redirect-unusable |
INFO | Before git is run, Pitloom asks the URL itself whether it redirects, so a redirect is checked before git follows it. That request got no usable answer: an HTTP error, a redirect without a Location, no answer in time, or a failed connection. | 0.25.0 |
git-ref-not-found |
ERROR | The Git URL names a branch, tag or commit (in its path, as a page URL's tree or blob part, or as a version query) that the repository does not have as a branch or tag; a commit is fetched only by its full hash. | 0.25.0 |
git-repository-unusable |
ERROR | git failed for a reason other than the network: the repository does not exist or is private (an HTTP 404, or a sign-in the server asked for), the server refused the request, or the answer was not a repository. The line ends with git's own messages, the server's included. | 0.25.0 |
git-repository-unusable/empty |
ERROR | The repository the Git URL names has no commits, so it holds no file to read. | 0.25.0 |
git-url-invalid |
ERROR | A Git URL is not one Pitloom fetches: its scheme is not http or https (ssh://, git://, file:// or an scp-style user@host:path), its port is not a number, or a part of its path, once decoded, is ., .., empty, or holds a backslash, a NUL or .git, which would read outside the checkout or git's own files. | 0.25.0 |
git-filter-unusable¶
- Level: INFO.
- Means: Pitloom fetches with a filter that leaves out large files the checkout does not need; the server answered it with an error (Azure DevOps: HTTP 400).
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Fetched again without the filter; the download cap still bounds what is fetched.
- Nothing to do: nothing to do: the fetch went on without the filter.
- Printed after:
Git source: <text>(a Git URL fetch), on its INFO lines; the prefix is not part of the line. - Lines:
INFO: URL=<url>: the server rejected the blob filter; fetching without it [git-filter-unusable]
git-link-unsafe¶
- Level: INFO.
- Means: The checkout holds symbolic links that lead outside the repository, into its .git directory, or to a folder. The repository is untrusted: following them would read files it does not hold, or walk a folder twice.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Removed the links before reading: the SBOM lists neither them nor what they point to.
- Nothing to do: nothing to do: the SBOM describes the repository's own files; a link's target is read from a local copy only.
- Printed after:
Git source: <text>(a Git URL fetch), on its INFO lines; the prefix is not part of the line. - Lines:
INFO: URL=<url>: <number> symbolic link(s) leading out of the repository, into its .git directory or to a folder; removed, not followed [git-link-unsafe]
git-missing¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A Git URL is fetched by running git, and no git program is on PATH.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Fetched nothing and wrote no SBOM (git.not-found).
- Tell the user: git is needed to read a Git URL. They install git (or put it on PATH) and run again, or clone the repository with another tool and run Pitloom on the local copy. Do not install it for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: git is not installed or not on PATH; nothing fetched [git-missing]
git-redirect-unusable¶
- Level: INFO.
- Means: Before git is run, Pitloom asks the URL itself whether it redirects, so a redirect is checked before git follows it. That request got no usable answer: an HTTP error, a redirect without a Location, no answer in time, or a failed connection.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Ran git on the URL as given, which follows no redirect.
- Nothing to do: nothing to do: if git cannot fetch the URL either, its own error follows.
- Printed after:
Git source: <text>(a Git URL fetch), on its INFO lines; the prefix is not part of the line. - Lines:
INFO: URL=<url>: could not be checked for a redirect (<why>); git asked directly [git-redirect-unusable]
git-ref-not-found¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: The Git URL names a branch, tag or commit (in its path, as a page URL's tree or blob part, or as a version query) that the repository does not have as a branch or tag; a commit is fetched only by its full hash.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Fetched no checkout and wrote no SBOM (git.ref-not-found).
- Tell the user: the repository has no branch or tag of that name. They check the spelling, give the full commit hash for a commit, or leave the version out for the default branch. Do not guess a ref for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: URL=<url>: no branch or tag <ref>; a commit needs its full 40 or 64 hex digits [git-ref-not-found]
git-repository-unusable¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: git failed for a reason other than the network: the repository does not exist or is private (an HTTP 404, or a sign-in the server asked for), the server refused the request, or the answer was not a repository. The line ends with git's own messages, the server's included.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Fetched no checkout and wrote no SBOM (git.clone-failed).
- Tell the user: git could not fetch the repository, with git's reason as the line gives it. They check the URL and their access; for a private repository they clone it themselves and run Pitloom on the local copy. Do not sign in or retry for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: git <command>: <error>; nothing fetched [git-repository-unusable]
git-repository-unusable/empty¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: The repository the Git URL names has no commits, so it holds no file to read.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Wrote no SBOM (git.clone-failed).
- Tell the user: the repository is empty. They check the URL names the repository they meant, or push to it first. Do not pick another repository for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: URL=<url>: an empty repository (no commits); nothing read [git-repository-unusable/empty]
git-url-invalid¶
- Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A Git URL is not one Pitloom fetches: its scheme is not http or https (ssh://, git://, file:// or an scp-style user@host:path), its port is not a number, or a part of its path, once decoded, is ., .., empty, or holds a backslash, a NUL or .git, which would read outside the checkout or git's own files.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Started no git process, fetched nothing and wrote no SBOM (git.url-invalid).
- Tell the user: the URL cannot be fetched, as the line says why. They give the https URL of the repository or of a page of it (the address a browser shows), or clone it themselves and run Pitloom on the local copy. Do not rewrite the URL for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: URL=<url>: only http and https URLs are fetched (not ssh, git, file or scp-style addresses); nothing fetched [git-url-invalid]
ERROR: URL=<url>: the port is not a number; nothing fetched [git-url-invalid]
ERROR: URL=<url>: a path part decodes to ., .., an empty part, a backslash, a NUL or .git; nothing fetched [git-url-invalid]
Summaries¶
A summary is an INFO: line that reports what a run did under its own rule (a
count, the key it wrote), with no condition to name: it carries no code, and
there is nothing to do.
- Each git command a Git URL fetch runs, as it runs, the credentials of a URL in it taken out: what git was asked, in order.
INFO: Git source: $ <command-line>