Skip to content

Commit 97dc5c1

Browse files
gavinmakLUCI
authored andcommitted
project: use --netrc-optional instead of --netrc
Some users are reporting a "curl: (26) .netrc error: no such file" message on sync caused by an change to curl behavior. See curl/curl#16163. Use --netrc-optional which was introduced in curl version 7.9.8 released in 2002. Bug: 409354839 Change-Id: I8365c6e806968a4ee765a7e023b4bced30489c20 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/467026 Reviewed-by: Mike Frysinger <[email protected]> Commit-Queue: Gavin Mak <[email protected]> Tested-by: Gavin Mak <[email protected]> Reviewed-by: Josip Sokcevic <[email protected]>
1 parent 0214730 commit 97dc5c1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

project.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2875,7 +2875,14 @@ def _FetchBundle(self, srcUrl, tmpPath, dstPath, quiet, verbose):
28752875

28762876
# We do not use curl's --retry option since it generally doesn't
28772877
# actually retry anything; code 18 for example, it will not retry on.
2878-
cmd = ["curl", "--fail", "--output", tmpPath, "--netrc", "--location"]
2878+
cmd = [
2879+
"curl",
2880+
"--fail",
2881+
"--output",
2882+
tmpPath,
2883+
"--netrc-optional",
2884+
"--location",
2885+
]
28792886
if quiet:
28802887
cmd += ["--silent", "--show-error"]
28812888
if os.path.exists(tmpPath):

0 commit comments

Comments
 (0)