We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.netrc
snap install httpie
machine api.opensuse.org login myusername password mypassword
$ http --version 3.2.1 $ http "https://api.opensuse.org/source/home:apritschet" HTTP/1.1 401 Unauthorized ...
Also, in combination with the environment variable NETRC I keep getting a 401 response.
NETRC
httpie should honor the .netrc file even when used as a snap. httpie installed from the Ubuntu repos does.
Please re-run the command with --debug, then copy the entire command & output and paste both below:
--debug
$ http --debug https://api.opensuse.org/source/home:apritschet HTTPie 3.2.1 Requests 2.27.1 Pygments 2.12.0 Python 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0] /snap/httpie/369/bin/python3 Linux 5.15.0-56-generic <Environment {'apply_warnings_filter': <function Environment.apply_warnings_filter at 0x7ff369fac670>, 'args': Namespace(), 'as_silent': <function Environment.as_silent at 0x7ff369fac550>, 'colors': 256, 'config': {'default_options': []}, 'config_dir': PosixPath('/home/andi/snap/httpie/369/.config/httpie'), 'devnull': <property object at 0x7ff369fbdbd0>, 'is_windows': False, 'log_error': <function Environment.log_error at 0x7ff369fac5e0>, 'program_name': 'http', 'quiet': 0, 'rich_console': <functools.cached_property object at 0x7ff36a023700>, 'rich_error_console': <functools.cached_property object at 0x7ff369fc4850>, 'show_displays': True, 'stderr': <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, 'stderr_isatty': True, 'stdin': <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>, 'stdin_encoding': 'utf-8', 'stdin_isatty': True, 'stdout': <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, 'stdout_encoding': 'utf-8', 'stdout_isatty': True}> <PluginManager {'adapters': [<class 'httpie_unixsocket.UnixSocketTransportPlugin'>, <class 'httpie_snapdsocket.SnapdSocketTransportPlugin'>], 'auth': [<class 'httpie.plugins.builtin.BasicAuthPlugin'>, <class 'httpie.plugins.builtin.DigestAuthPlugin'>, <class 'httpie.plugins.builtin.BearerAuthPlugin'>], 'converters': [], 'formatters': [<class 'httpie.output.formatters.headers.HeadersFormatter'>, <class 'httpie.output.formatters.json.JSONFormatter'>, <class 'httpie.output.formatters.xml.XMLFormatter'>, <class 'httpie.output.formatters.colors.ColorFormatter'>]}> >>> requests.request(**{'auth': None, 'data': RequestJSONDataDict(), 'headers': <HTTPHeadersDict('User-Agent': b'HTTPie/3.2.1')>, 'method': 'get', 'params': <generator object MultiValueOrderedDict.items at 0x7ff369c3db30>, 'url': 'https://api.opensuse.org/source/home:apritschet'}) HTTP/1.1 401 Unauthorized Accept-Ranges: bytes Connection: Upgrade, Keep-Alive Content-Language: en Content-Type: text/html; charset=utf-8 Date: Wed, 04 Jan 2023 12:11:44 GMT Keep-Alive: timeout=15, max=100 Server: Apache Strict-Transport-Security: max-age=31536000 Transfer-Encoding: chunked Upgrade: h2 Vary: accept-language,accept-charset WWW-Authenticate: Basic realm="Use your SUSE developer account" ...
Pardon me for not including all the HTML output.
The text was updated successfully, but these errors were encountered:
I was also confused by the documentation:
Authentication information from your ~/.netrc file is by default honored as well.
~/.netrc
It does not seem to work within httpie version 3.2.1 at the moment.
httpie
3.2.1
https://github.com/httpie/httpie/blob/b16392fbb9aee707c0449f10dab6bfd9ad4b8799/docs/README.md?plain=1#L1357-L1376
Related issue:
Sorry, something went wrong.
i am not sure what snap is but i am having the same issue
snap
on mac via brew install httpie
brew install httpie
No branches or pull requests
Minimal reproduction code and steps
snap install httpie
.netrc
file.netrc
Current result
Also, in combination with the environment variable
NETRC
I keep getting a 401 response.Expected result
httpie should honor the
.netrc
file even when used as a snap. httpie installed from the Ubuntu repos does.Debug output
Please re-run the command with
--debug
, then copy the entire command & output and paste both below:Pardon me for not including all the HTML output.
The text was updated successfully, but these errors were encountered: