This message was deleted.
# help
b
This message was deleted.
1
b
Hello!
m
hi
b
Have you been using our example pipeline yaml?
m
yes
b
I haven't seen this error before, I suspect you have a private repo and the pipeline can't access it. Could you please try adding
--config http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)"
to the
Checkout base branch
step and retry?
It would look like
git clone $(Build.Repository.Uri) --branch=${branch} --single-branch /tmp/base --config http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)"
m
ah yes its a private repo and we are using ubuntu selfhosted agaents
now getting Cloning into '/tmp/base'... warning: Could not find remote branch to clone. fatal: Remote branch not found in upstream origin ##[error]Bash exited with code '128'. #
b
That's progress 🙂 Now we have access, but something's wrong with the branch name
m
ok, branch is Main
b
We tried to derive the name from the pull request:
Copy code
branch=$(System.PullRequest.TargetBranch)
branch=${branch#refs/heads/}
You can add
echo ${branch}
to the step and see what it outputs
Or, just for the sake of test, you can just hardcode it for now
m
just testing with a new PR
👍 1
appears to be working now
qq, if using modules does th epipeline scan all folders within teh root terraform folder specified in path?
b
Yes
m
great thanks
👍 1
b
If your modules are also private, an additional setup is needed. Our example describes it in its comments
m
oh ok, yes whole repo is private therefore all modules are as well
b
Ah, alright. If they are part of the repo, then no actions are needed. I thought about the modules stored in different repos 🙂
200 Views