# Run pipeline manually for any forked repo

**URL:** <https://forum.buildkite.community/t/run-pipeline-manually-for-any-forked-repo/2005>\
**Category:** General\
**Created:** [April 27, 2022, 6:19am UTC](https://forum.buildkite.community/t/run-pipeline-manually-for-any-forked-repo/2005 "2022-04-27T06:19:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avnshrai](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Avnshrai](https://forum.buildkite.community/u/Avnshrai)\
**Post date:** [April 27, 2022, 6:19am UTC](https://forum.buildkite.community/t/run-pipeline-manually-for-any-forked-repo/2005/1 "2022-04-27T06:19:39Z")

</div>

I forked a main repo and named it something and created a new pipeline on buildkite and now I want to build manually on that new pipeline from that forked repo.  
suppose I have a repo “abc” and I forked it privately. That created a branch (‘patch-1’) and then we created a new pipeline on buildkite and committed something on the repo. Now I want to build manually on that new pipeline using this new branch (‘patch-1’)  
there is a env variable “BUILDKITE\_REPO” but while creating a build when we are providing a repo url of that forked repo in UI in env variable it is still building build for that main pipeline, we are new to buildkite so, any help will be appreciated…

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [April 27, 2022, 12:05pm UTC](https://forum.buildkite.community/t/run-pipeline-manually-for-any-forked-repo/2005/2 "2022-04-27T12:05:02Z")

</div>

Hi @Avnshrai welcome to the forum! 👋

I’m just trying to understand what you’ve done so far and what you are wanting to achieve. You’ve created a fork of a repo and a new pipeline intended to build the fork? Or are you wanting to use the old pipeline to build the forked repo?

If the former, since you’ve created a new pipeline, you can configure it in settings to point to the fork. It doesn’t need to know anything about the original repo and should just work without modifying the env vars.

However, the latter is a bit difficult. You can’t set the `BUILDKITE_REPO` env var in the UI as it is protected. You would need to use an [environment hook](https://buildkite.com/docs/agent/v3/hooks#job-lifecycle-hooks) to override it at runtime.

We might be able to provide more concrete information if you email us at [support@buildkite.com](mailto:support@buildkite.com) with details of the repo and pipeline you are working with as well.

---

<div class="post-metadata">

**Author:** ![Avnshrai](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Avnshrai](https://forum.buildkite.community/u/Avnshrai)\
**Post date:** [April 28, 2022, 7:17am UTC](https://forum.buildkite.community/t/run-pipeline-manually-for-any-forked-repo/2005/3 "2022-04-28T07:17:05Z")

</div>

Hi @paula thank you for your quick response and I was trying to use a forked repo to build a old pipeline and as you told me to override it at runtime to achieve that I wrote a script inside environment hook to override the BUILDKITE\_REPO and it worked like a charm…  
thanx for your help 😁

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [April 28, 2022, 7:18am UTC](https://forum.buildkite.community/t/run-pipeline-manually-for-any-forked-repo/2005/4 "2022-04-28T07:18:09Z")

</div>

That’s great news @Avnshrai. Happy to help!
