question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.netrc not honored if auth-type is used

See original GitHub issue

Once --auth-type switch is used, .netrc is not honored. Authentication details must be provided via --auth switch.

Details:

# http --debug --auth-type=basic example.org
HTTPie 0.9.8
Requests 2.19.1
Pygments 2.2.0
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516]
/usr/bin/python
Linux 4.9.0-9-amd64

<Environment {
    "colors": 8,
    "config": {
        "__meta__": {
            "about": "u'HTTPie configuration file'",
            "help": "u'https://httpie.org/docs#config'",
            "httpie": "u'0.9.8'"
        },
        "default_options": "[]"
    },
    "config_dir": "/root/.httpie",
    "is_windows": false,
    "stderr": "<open file '<stderr>', mode 'w' at 0x7fd6490091e0>",
    "stderr_isatty": true,
    "stdin": "<open file '<stdin>', mode 'r' at 0x7fd6490090c0>",
    "stdin_encoding": "UTF-8",
    "stdin_isatty": true,
    "stdout": "<open file '<stdout>', mode 'w' at 0x7fd649009150>",
    "stdout_encoding": "UTF-8",
    "stdout_isatty": true
}>
usage: http [--json] [--form] [--pretty {all,colors,format,none}]
            [--style STYLE] [--print WHAT] [--headers] [--body] [--verbose]
            [--all] [--history-print WHAT] [--stream] [--output FILE]
            [--download] [--continue]
            [--session SESSION_NAME_OR_PATH | --session-read-only SESSION_NAME_OR_PATH]
            [--auth USER[:PASS]] [--auth-type {basic,digest}]
            [--proxy PROTOCOL:PROXY_URL] [--follow]
            [--max-redirects MAX_REDIRECTS] [--timeout SECONDS]
            [--check-status] [--verify VERIFY]
            [--ssl {ssl2.3,tls1,tls1.1,tls1.2}] [--cert CERT]
            [--cert-key CERT_KEY] [--ignore-stdin] [--help] [--version]
            [--traceback] [--default-scheme DEFAULT_SCHEME] [--debug]
            [METHOD] URL [REQUEST_ITEM [REQUEST_ITEM ...]]
http: error: --auth required

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jakubroztocilcommented, Jun 9, 2020

Sounds good 👍

0reactions
jakubroztocilcommented, Jun 16, 2020

This is now addressed in current master via b865988. Feedback would be appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.netrc - HTTPie 3.2.1 (latest) docs
Authentication information from your ~/.netrc file is by default honored as well. For example. This can be disabled with the --ignore-netrc option.
Read more >
Git .netrc file authentication issue - Stack Overflow
The ~/.netrc (or %HOME%\_netrc on Windows) file isn't enough. It is best to use that file encrypted, with gpg + netrc alone, as...
Read more >
http remotes ignore annex.web-options --netrc
The documentation for git config annex.web-options says that I should be able to use it to set up HTTP credentials in a ~/.netrc...
Read more >
Sourcetree credentials for Bitbucket - Atlassian Community
Solved: In my attempts to get Sourcetree to not prompt me for a password to bitbucket all the time, I'm now down a...
Read more >
1425097 – F26 wget does not honor .netrc - Red Hat Bugzilla
Note that 'user' and 'password' are used slightly differenty in http.c vs. ftp.c, hence the difference in dereferencing when determining whether ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found