-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't fetch with fetch-tags
when triggered by tag
#1467
Comments
UPDATE: seems just removing the Same problem here: https://github.com/serious-scaffold/serious-scaffold-python/actions/runs/6142805118/job/16665155663 |
This seems to cause a conflict when the workflow is triggered by a tag itself: actions/checkout#1467
See eg actions/checkout#1467 trying an explicit fetch-depth as per comments there.
When I run an action on a tag, I noticed that:
Doesn't work and results in "Error: fatal: Cannot fetch both...".
Does work. |
Fix cannot fetch both <commit> and tags following the suggestion: actions/checkout#1467 (comment)
Due to a bug in the `actions/checkout@v4` workflow, `git fetch` fails when the workflow was triggered by a tag: actions/checkout#1467
The observed behavior seems to be a bug, see actions/checkout#1467.
Apparently i'm special and the workaround for actions/checkout#1467 doesn't work for me.
Apparently i'm special and the workaround for actions/checkout#1467 doesn't work for me.
For some reason the Looking at my build logs, it seems like the commit the tag is pointing to is fetched by its hash but stored under the ref of the tag. Since git sees that a tag is attached to this commit, it tries to fetch this as well and store it under the same ref. That is causing the conflict git complains about. Right now, when i fetch the tags manually after checkout, i have to specify |
Currently, the checkout GitHub Action failed to check out when both `fetch-depth` and `fetch-tags` are specified during a tag push event(actions/checkout#1467). This patch workarounds the issue by manually do the tag fetch afterwards. Refer-to: Can't fetch with `fetch-tags` when triggered by tag · Issue #1467 · actions/checkout <actions/checkout#1467> Refer-to: Switch back to an improved manual tag fetching method · wxFormBuilder/wxFormBuilder@459563b <wxFormBuilder/wxFormBuilder@459563be8> Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
Currently, the checkout GitHub Action failed to check out when both `fetch-depth` and `fetch-tags` are specified during a tag push event(actions/checkout#1467). This patch workarounds the issue by manually do the tag fetch afterwards. Refer-to: Can't fetch with `fetch-tags` when triggered by tag · Issue #1467 · actions/checkout <actions/checkout#1467> Refer-to: Switch back to an improved manual tag fetching method · wxFormBuilder/wxFormBuilder@459563b <wxFormBuilder/wxFormBuilder@459563be8> Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
This is hopefully just a temporary fix for actions/checkout#1467
This is hopefully just a temporary fix for actions/checkout#1467
Can't use fetch-tags on a tag apparently. See actions/checkout#1467.
any update on this issue? |
also hit this on any update? |
did anyone find a work-around that works with also running into this with |
@oshina-gravity I worked around the issue by fetching my tag of interest manually from
This has also resolved another issue with |
The actions/checkout step has some bugs: actions/checkout#1467 Change-Id: I6bd88433425657081c2033b55bf01587979983df
fatal: Cannot fetch both 8c823bfe0180c56c89e9a54148c196fb1df3ba5b and refs/tags/v0.15.3 to refs/tags/v0.15.3 actions/checkout#1467
I'm a bit bewildered regarding how git fetch --tags …which is a safe operation that should never fail. However, this does not seem to be the case at all. With the only provided documentation being:
…what
Until point 2 or 3 of the above is completed, I'll remove |
Hi @asbjornu, I agree with you. This is much more puzzling than it should be. Also, IMO the handling of #579 by GitHub was very unfortunate: a But just for sake of discussion: I can see responses that argue your points:
Yet again, I'm not opposing what you said, just explaining relevant nuance. I also don't find this
entirely satisfactory documentation. Edit: oh, and the original |
I have also faced similar issue using this flag. In may case, I am reading the tag annotation message. But it seems this flag overrides the annotation message with the first line of commit message the tag points to. For now i am resorting to using the below option:
|
Here is bug of actions/checkout: actions/checkout#1467
Here is bug of actions/checkout: actions/checkout#1467
This is a partial revert of 0115c28; apparently actions/checkout's "fetch-tags" property is broken and gives errors at checkout time. Ref: actions/checkout#1467
This is a partial revert of 0115c28; apparently actions/checkout's "fetch-tags" property is broken and gives errors at checkout time. Ref: actions/checkout#1467
Fetch git tags manually. Ref actions/checkout#1467
Fetch git tags manually. Becasue of actions/checkout#1467
It sounds like fetch tags is not needed? actions/checkout#1467 Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
It sounds like fetch tags is not needed? actions/checkout#1467 Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
Getting the following error:
Error: fatal: Cannot fetch both <sha> and refs/tags/<tag> to refs/tags/<tag>
Example workflow:
Example of a failing run.
Raw log
What am I doing wrong here?
The text was updated successfully, but these errors were encountered: