Minor inaccuracy in Go proxy documentation
235c45ba introduced a minor issue in the Go proxy documentation here:
I wrote this block with netrc
as the language. When @sselhorn updated per #247950 (closed), she made the reasonable assumption that the code block was a shell command and updated the block to use shell
as the language, but that is not the case (machine
is not a shell command, or at least does not produce the desired result).
The intent is, "To add a personal access token to ~/.netrc
, you must append machine <url> password <token>
to the file." Two ways to write it occur to me:
Add the text
machine <url> login <username> password <token>
to the end of the file~/.netrc
(create the file if it does not exist).
Or
Add it to
~/.netrc
by executing the following in a shell:echo "machine $URL login $USER password $TOKEN" >> ~/.netrc
Neither of these options strike me as being particularly good. With the first (very similar to my original commit) I am trying to be accessible to users unfamiliar with bash. @sselhorn can you think of a better way to write this?
Another complicating factor is this line from the haxx.se link:
On Windows, curl will look for it with the name _netrc
AFAIK there isn't really a standard for this, so I don't know that there is a standard location to look for a netrc file. On Windows, Go looks at ~/.netrc
and ~/_netrc
, so at least for Go the instructions should work.