Elastic Deploy Runner: Error: main is not a supported Git Ref for running apply
A customer asked: > I was setting up the CI workflow on GitHub for my new Ref Arch and got this error: ``` [infrastructure-deploy-script] 2022-02-24 22:23:03 Running command "git config --global url.https://bitbucket.org/.insteadOf [git@bitbucket.org](mailto:git@bitbucket.org):" [33](https://github.com/variational-research/infrastructure-live/runs/5326010392?check_suite_focus=true#step:12:33) [ecs-deploy-runner][2022-02-24T22:23:03+0000] Error: main is not a supported Git Ref for running apply [34](https://github.com/variational-research/infrastructure-live/runs/5326010392?check_suite_focus=true#step:12:34) [ecs-deploy-runner][2022-02-24T22:23:03+0000] exit status 1 ```
For this particular case, the issue is indeed that the deploy runner is configured to expect `master` based on the form input, and there is a bug in our scripts where it generated the GitHub Actions expecting `main`. My recommendation would be to switch your main git branch to using `master` by creating a new branch off of `main` and pushing that as the default branch for your repo. Once you do that, you will want to make sure the GitHub Actions code is updated to use `master` instead of `main`. Alternatively, if you wish to continue using main, you can update the allowed apply refs from master to main for the ecs-deploy-runner here: `https://github.com/gruntwork-clients/infrastructure-live-<your-company-name>/blob/main/_envcommon/mgmt/ecs-deploy-runner.hcl` Note that the latter requires deploying the `ecs-deploy-runner` module in each account to take effect.