Cannot get tag when cloning repository for iOS

Bitrise Build Issue Report template

Description of the issue

Our native iOS repository has tags (that are not located on branches) that are pushed to remote. There was a fix to this in the git clone step v.3.4.2 (referenced in this issue: Cannot find tag when cloning repository), but it seems to have broken somewhere along the line in v.4.0.0. Are there plans to reimplement the strategy of try fetching, then try fetching all tags?


A fully native iOS project running on Bitrises’s Sierra + Xcode 9.0.x stack. The failure occurs on the Git clone step v4.0.5.


  • 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
  • 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. : NO
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Around v4.0.0

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what will get when it does a git clone in the clean environment! If possible please note which sections you tried.

Yes. Our project requires git fetch --tags to be run instead of just git fetch, so the removal of the latter in the git clone step causes the checkout to fail.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( )? If no, can it be reproduced with Docker (using the same docker images / environment we use on Related guide: .

Yes. Just calling git fetch will not fetch the tag that we’ve pushed to the origin. Calling git fetch --tags will.

Build log

Please copy paste the build’s URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - ), with a link to the related Discuss issue.

Hi @alexwang-coursera,

Indeed it’s missing from v4 (which was a significant rewrite of the step, to make it more maintainable).

I’ll schedule an update/fix for this for next week, thanks for reporting and sorry for the inconvenience!

If you’d have any questions just let me know!