hashicorp / go-getter

Package for downloading things from a string URL using a variety of protocols.
Mozilla Public License 2.0
1.66k stars 239 forks source link

How to pass customer params to git clone? #499

Open RoxKilly opened 4 months ago

RoxKilly commented 4 months ago

Suppose I'm trying to download a repo using the GitGetter:

git::https://github.acme.com/team/repo

Under the hood, something like this gets executed:

git clone https://github.acme.com/team/repo /tmp/dir

The server expects me to send some extra headers. From my shell I can clone with:

git clone -c http.extraHeader='header: val' https://github.acme.com/team/repo /tmp/dir

What is the idiomatic to pass extra args to git clone (source code)?