Garden and Github Actions ? Pull sources from same...
# 🌱|help-and-getting-started
Hey folks, I wanted to ask you a question related to garden and github actions. Here is what i have: 1.
with three other repos on github linked as
is github
protocol (
) 2. we run
garden deploy
on github actions to deploy to test, dev, prod environments and also on local machine for local development in dev clusters. Now my question is, does anyone here has any experience in getting garden to pull sources on Github Actions runners from other repos in the same organization? For my purposes, I don't want to use ssh keys on the runners or use PATs to authenticate the github org. I decided to GitHub apps, which is installed on all repos and I get a short lived token while running the workflow. I would like to use this token to configure the git client on the runner and then make garden pull sources without running into auth issues. However I haven't been able to get it working.
Hi @breezy-queen-93424 you should be able to do this by altering the git config before running the Garden command in your github action instance as a preceding step. something like this command might do the trick:
Copy code
git config --global url."https://oauth2:${{ secrets.GITHUB_TOKEN }}".insteadOf
@big-spring-14945 Thanks, I am doing something similar,
Copy code
- name: Rewrite SSH to HTTPS for GitHub URLs
      shell: bash
      run: |
        git config --global http. "AUTHORIZATION: bearer ${GH_APP_TOKEN}"
        git config --global url."".insteadOf
        git config --global url."".insteadOf ssh://
But garden still ends up using ssh. Let me try using
in the url scheme. Thanks for answering.
Worked, both with
. Thanks @big-spring-14945
Happy to hear it helped!