Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Allow Google Cloud SDK env entries for git
Browse files Browse the repository at this point in the history
Usng git with Google Cloud requires a git credential helper; this is
less painful if the env entries it expects can be passed through to
git (which will pass them on to the helper. See #2119.
  • Loading branch information
squaremo committed Jul 8, 2019
1 parent 0cee385 commit a4e692a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions git/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,18 @@ var exemptedTraceCommands = []string{
// "config",
}

// Env vars that are allowed to be inherited from the os
var allowedEnvVars = []string{"http_proxy", "https_proxy", "no_proxy", "HOME", "GNUPGHOME", "SECRETS_DIR", "SECRETS_EXTENSION"}
// Env vars that are allowed to be inherited from the OS
var allowedEnvVars = []string{
// these are for people using (no) proxies
"http_proxy", "https_proxy", "no_proxy",
// these are needed for GPG to find its files
"HOME", "GNUPGHOME",
// these for the git-secrets helper
"SECRETS_DIR", "SECRETS_EXTENSION",
// these are for Google Cloud SDK to find its files (which will
// have to be mounted, if running in a container)
"CLOUDSDK_CONFIG", "CLOUDSDK_PYTHON",
}

type gitCmdConfig struct {
dir string
Expand Down

0 comments on commit a4e692a

Please sign in to comment.