diff options
author | Torne (Richard Coles) <torne@google.com> | 2013-01-11 16:22:54 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2013-01-11 16:22:54 +0000 |
commit | ed68d0e8529f059a5d989ebd505bfb53e869ec2f (patch) | |
tree | c876b1a372ae8d9b2f0681b64fac0ef1f0cbb613 | |
parent | a9f11b3cb281270084526a490dc61625b51b8192 (diff) | |
download | git-repo-ed68d0e8529f059a5d989ebd505bfb53e869ec2f.tar.gz |
Check for a cookie file when fetching clone.bundle.
If the user's git config specifies a cookie file for HTTP, use it when
fetching clone.bundle, as it may contain the required login credentials
to get access (e.g. when used with Compute Engine service accounts).
Change-Id: I12ee9e38694822ef1de4ed62138c3876c43f431b
-rw-r--r-- | project.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1746,6 +1746,9 @@ class Project(object): | |||
1746 | os.remove(tmpPath) | 1746 | os.remove(tmpPath) |
1747 | if 'http_proxy' in os.environ and 'darwin' == sys.platform: | 1747 | if 'http_proxy' in os.environ and 'darwin' == sys.platform: |
1748 | cmd += ['--proxy', os.environ['http_proxy']] | 1748 | cmd += ['--proxy', os.environ['http_proxy']] |
1749 | cookiefile = GitConfig.ForUser().GetString('http.cookiefile') | ||
1750 | if cookiefile: | ||
1751 | cmd += ['--cookie', cookiefile] | ||
1749 | cmd += [srcUrl] | 1752 | cmd += [srcUrl] |
1750 | 1753 | ||
1751 | if IsTrace(): | 1754 | if IsTrace(): |