AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Git checkout tag from remote1/16/2024 This is caused because the hash is reachable only via a tag and because the git "fetch" "-tags" seems to be issued only when using the tag field in the UI. # The clone step will complain that hash does not exist $ git log -format="%H" -n 1 will-fail-for-hash So I can simple reproducible step for hash being not reachable is: # Make some changes to repository I tried again with latest clone step (3.4.1) and it failed again using commit hash id. So the problem is caused because the commit is not reachable via any branch (only via tags). In the mean time, before your reply, I tried using the commit hash directly. Does upgrading the build Step to the latest version help? : Did not tried.Once a day about x% of the builds) : Hard to say If it’s an issue which happens sporadically, what’s the frequency? (e.g.If you have multiple different build configurations (workflows), does the issue affect all/more than one? : yes.Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app.Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : no (at least no the two other tries I tried).The clone repository step Reproducibility Seems as a cache problem but why? This happened once in the past for me and waiting a little bit and building again “fixed” the issue. It’s really unclear why the tag cannot be retrieved. You will see that the build was started after the clone on my workstation, so I really don’t see why it cannot find the tag. After that, I started another build ( ) but it failed again with the same error. > 10:43:45 directlink-android git:(develop) > 10:43:44 /tmp/directlink-android git:(develop) Then, I clone the repository on my /tmp folder to check if it would work from my side: > 10:43:17 directlink-android git:(master) I rebuild this build and failed with the same error message ( ). Indeed, in the log tag listing, I do not see it in the list. (i) Removing private key file: /root/.ssh/bitrise Įrror: pathspec 'v1.0.1.beta.4' did not match any file(s) known to git.Įrror: Could not do checkout v1.0.1.beta.4 This one failed saying the tag does not exist. Then started a build with a specific tag ( ). Remote: Resolving deltas: 100% (2/2), completed with 2 local objects. It’s really clear why it’s not working correctly as cloning to /tmp dir on my work machine list all the tags correctly.Īt 10:29 (EST), I pushed a tag v1.0.1.beta.4 to the repository: > 10:29:50 directlink-android git:(master) Sometimes when I push tag and start a build manually, the build failed at the clone step saying tag is not present. Remote: Compressing objects: 100% (6/6), done.Bitrise Build Issue Report template Description of the issue You get the "detached" heads referenced by your tags. Otherwise only the tags in branches will be pulled. This means that anyone pulling or fetching will not get this tagged head. In both cases you need to be aware that you are pushing a detached head. If you want to use your ref syntax, it would be as follows: git push origin refs/tags/0.0.1:refs/tags/0.0.1 What will happen: Counting objects: 1, done. You can always push the tag directly, it will be pushed detached of a branch.
0 Comments
Read More
Leave a Reply. |