You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run across people / repositories where they have workflows that for varying reasons end up asking the checkout action (typically actions/checkout@v4) for a branch/tag/reference that doesn't exist:
Cloning into 'checkout-missing-reference-0'...
warning: Could not find remote branch hello-world to clone.
fatal: Remote branch hello-world not found in upstream origin
Error: Process completed with exit code 128
If one uses actions/checkout@v4, one sees exit code 1 but this isn't particularly helpful:
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/hello-world*:refs/remotes/origin/hello-world* +refs/tags/hello-world*:refs/tags/hello-world*
The process '/usr/bin/git' failed with exit code 1
Waiting 15 seconds before trying again
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/hello-world*:refs/remotes/origin/hello-world* +refs/tags/hello-world*:refs/tags/hello-world*
The process '/usr/bin/git' failed with exit code 1
Waiting 20 seconds before trying again
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/hello-world*:refs/remotes/origin/hello-world* +refs/tags/hello-world*:refs/tags/hello-world*
Error: The process '/usr/bin/git' failed with exit code 1
Note that users are using actions/checkout@v4, they aren't using git ... fetch and there's no reason to expect end users to understand implementation details of git ... fetch -- that's why they're using actions/checkout@....
I've run across people / repositories where they have workflows that for varying reasons end up asking the
checkout
action (typicallyactions/checkout@v4
) for a branch/tag/reference that doesn't exist:If one uses
git
directly:If one uses
actions/checkout@v4
, one seesexit code 1
but this isn't particularly helpful:Note that users are using
actions/checkout@v4
, they aren't usinggit ... fetch
and there's no reason to expect end users to understand implementation details ofgit ... fetch
-- that's why they're usingactions/checkout@...
.It is possible to improve the user experience -- consider these changes:
https://github.com/check-spelling-sandbox/checkout-missing-reference-0/actions/runs/8694496977
Note: the error handling and reporting is much better when a repository doesn't exist.
The text was updated successfully, but these errors were encountered: