Artifactspublic-v0

curl

master
ply4 git calls32 ms288 KiB3 cachedprotocol v2
84 lines2.7 KiBRaw

--config

Specify a text file to read curl arguments from. The command line arguments found in the text file are used as if they were provided on the command line.

Options and their parameters must be specified on the same line in the file, separated by whitespace, colon, or the equals sign. Long option names can optionally be given in the config file without the initial double dashes and if so, the colon or equals characters can be used as separators. If the option is specified with one or two dashes, there can be no colon or equals character between the option and its parameter.

If the parameter contains whitespace or starts with a colon (:) or equals sign (=), it must be specified enclosed within double quotes ("like this"). Within double quotes the following escape sequences are available: \, ", \t, \n, \r and \v. A backslash preceding any other letter is ignored.

If the first non-blank column of a config line is a '#' character, that line is treated as a comment.

Only write one option per physical line in the config file. A single line is required to be no more than 10 megabytes (since 8.2.0).

Specify the filename to --config as minus "-" to make curl read the file from stdin.

Note that to be able to specify a URL in the config file, you need to specify it using the --url option, and not by writing the URL on its own line. It could look similar to this:

url = "https://curl.se/docs/"

# --- Example file ---
# this is a comment
url = "example.com"
output = "curlhere.html"
user-agent = "superagent/1.0"

# and fetch another URL too
url = "example.com/docs/manpage.html"
-O
referer = "http://nowhereatall.example.com/"
# --- End of example file ---

When curl is invoked, it (unless --disable is used) checks for a default config file and uses it if found, even when --config is used. The default config file is checked for in the following places in this order:

  1. "$CURL_HOME/.curlrc"

  2. "$XDG_CONFIG_HOME/curlrc" (Added in 7.73.0)

  3. "$HOME/.curlrc"

  4. Windows: "%USERPROFILE%.curlrc"

  5. Windows: "%APPDATA%.curlrc"

  6. Windows: "%USERPROFILE%\Application Data.curlrc"

  7. Non-Windows: use getpwuid to find the home directory

  8. On Windows, if it finds no .curlrc file in the sequence described above, it checks for one in the same directory the curl executable is placed.

On Windows two filenames are checked per location: .curlrc and _curlrc, preferring the former. Older versions on Windows checked for _curlrc only.

1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: config
5Arg: <file>
6Help: Read config from a file
7Short: K
8Category: curl
9Added: 4.10
10Multi: append
11See-also:
12 - disable
13Example:
14 - --config file.txt $URL
15---
17# `--config`
19Specify a text file to read curl arguments from. The command line arguments
20found in the text file are used as if they were provided on the command
21line.
23Options and their parameters must be specified on the same line in the file,
24separated by whitespace, colon, or the equals sign. Long option names can
25optionally be given in the config file without the initial double dashes and
26if so, the colon or equals characters can be used as separators. If the option
27is specified with one or two dashes, there can be no colon or equals character
28between the option and its parameter.
30If the parameter contains whitespace or starts with a colon (:) or equals sign
31(=), it must be specified enclosed within double quotes ("like this"). Within
32double quotes the following escape sequences are available: \\, \", \t, \n, \r
33and \v. A backslash preceding any other letter is ignored.
35If the first non-blank column of a config line is a '#' character, that line
36is treated as a comment.
38Only write one option per physical line in the config file. A single line is
39required to be no more than 10 megabytes (since 8.2.0).
41Specify the filename to --config as minus "-" to make curl read the file from
42stdin.
44Note that to be able to specify a URL in the config file, you need to specify
45it using the --url option, and not by writing the URL on its own line.
46It could look similar to this:
48 url = "https://curl.se/docs/"
50 # --- Example file ---
51 # this is a comment
52 url = "example.com"
53 output = "curlhere.html"
54 user-agent = "superagent/1.0"
56 # and fetch another URL too
57 url = "example.com/docs/manpage.html"
58 -O
59 referer = "http://nowhereatall.example.com/"
60 # --- End of example file ---
62When curl is invoked, it (unless --disable is used) checks for a default
63config file and uses it if found, even when --config is used. The default
64config file is checked for in the following places in this order:
661) **"$CURL_HOME/.curlrc"**
682) **"$XDG_CONFIG_HOME/curlrc"** (Added in 7.73.0)
703) **"$HOME/.curlrc"**
724) Windows: **"%USERPROFILE%\.curlrc"**
745) Windows: **"%APPDATA%\.curlrc"**
766) Windows: **"%USERPROFILE%\Application Data\.curlrc"**
787) Non-Windows: use getpwuid to find the home directory
808) On Windows, if it finds no *.curlrc* file in the sequence described above, it
81checks for one in the same directory the curl executable is placed.
83On Windows two filenames are checked per location: *.curlrc* and *_curlrc*,
84preferring the former. Older versions on Windows checked for *_curlrc* only.
Diagnostics4 git calls · 32 ms
CallStatusSizeTime032 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=27
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2001.4 KiB · hit27 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=1451
git.response.cache=HIT
git.response.duration_ms=27
git.fetch.wants=637918df75dd101041de04e8b9e431bd9d892ea5
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1451
git.pkt.payload.max=1430
git.sideband.band1.bytes=1429
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e30713ad0415db
Request
4f160aba…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format