# Manually trigger build from old tag / commit

**URL:** https://travis-ci.community/t/manually-trigger-build-from-old-tag-commit/6485
**Category:** Travis CI Discussions & Feedback
**Tags:** trigger-custom-build
**Created:** [December 14, 2019, 11:34pm UTC](https://travis-ci.community/t/manually-trigger-build-from-old-tag-commit/6485 "2019-12-14T23:34:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tim-norris-lrn](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/tim-norris-lrn/32/3418_2.png) [@tim-norris-lrn](https://travis-ci.community/u/tim-norris-lrn)
#### Post date: [December 14, 2019, 11:34pm UTC](https://travis-ci.community/t/manually-trigger-build-from-old-tag-commit/6485/1 "2019-12-14T23:34:28Z")

</div>

Sorry if this is in the wrong spot, I’m not really sure where else to ask this question.

Is there a way to retroactively build from an old tag or commit id? I’m able to successfully build from new tags but not old. Is something like this even possible? I’ve seen people talk about using the API for similar things. Has any ever ran into this need / issue? Thanks!

---

<div class="post-metadata">

### Author: ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)
#### Post date: [December 14, 2019, 11:41pm UTC](https://travis-ci.community/t/manually-trigger-build-from-old-tag-commit/6485/2 "2019-12-14T23:41:09Z")

</div>

It’s possible to [manually trigger a build via API](https://docs.travis-ci.com/user/triggering-builds/) but only for valid remote refs (specifically, for what can be passed to `git clone --branch`).

If the commit you are interested in doesn’t qualify, you can always get around that by creating a branch or a tag at it (then a build would be created automatically since that’s a new change).

> [@Trigger a specific commit via the Travis API](https://travis-ci.community/t/trigger-a-specific-commit-via-the-travis-api/4718/2):
>
> Yes, it’s only possible to specify branch names (more specifically, valid remote refs). I’ve tried supplying a SHA-1 instead as branch and [a build was created](https://travis-ci.org/native-api/test_travis/jobs/571856078). But the supplied name is being passed to git clone --branch and the cloning thus failed. Nothing prevents you from creating a topic branch at any commit though. (See also [https://stackoverflow.com/questions/14370157/git-fetch-a-specific-commit-by-hash](https://stackoverflow.com/questions/14370157/git-fetch-a-specific-commit-by-hash) for what valid input is in Git terms.)
