Skip to content

Commit

Permalink
Merge pull request sdboyer/gps#141 from kamilchm/no-git-askpass
Browse files Browse the repository at this point in the history
Don't show any git password prompt
  • Loading branch information
sdboyer authored Jan 12, 2017
2 parents ec54b91 + 6f5704b commit 63a42cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vcs_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ func (s *gitSource) doListVersions() (vlist []Version, err error) {
r := s.crepo.r
var out []byte
c := exec.Command("git", "ls-remote", r.Remote())
// Ensure no terminal prompting for PWs
c.Env = mergeEnvLists([]string{"GIT_TERMINAL_PROMPT=0"}, os.Environ())
// Ensure no prompting for PWs
c.Env = mergeEnvLists([]string{"GIT_ASKPASS=", "GIT_TERMINAL_PROMPT=0"}, os.Environ())
out, err = c.CombinedOutput()

all := bytes.Split(bytes.TrimSpace(out), []byte("\n"))
Expand Down

0 comments on commit 63a42cb

Please sign in to comment.