akamai / httpie-edgegrid

Plugin for httpie to allow edge grid authentication for Akamai
Apache License 2.0
67 stars 22 forks source link

auth-type error #24

Closed phrend closed 2 years ago

phrend commented 2 years ago

Running on MacOS in a virtualenv, I get the following (as is mentioned in your README):

usage:
    http [--auth-type {basic,bearer,digest}] [METHOD] URL [REQUEST_ITEM ...]

error:
    argument --auth-type/-A: invalid choice: 'edgegrid' (choose from 'basic', 'bearer', 'digest')
$ pip freeze
certifi==2022.6.15
cffi==1.15.1
charset-normalizer==2.1.0
cryptography==37.0.4
defusedxml==0.7.1
edgegrid-python==1.2.1
httpie==3.1.0
idna==3.3
multidict==6.0.2
ndg-httpsclient==0.5.1
pyasn1==0.4.8
pycparser==2.21
Pygments==2.12.0
pyOpenSSL==22.0.0
PySocks==1.7.1
requests==2.28.1
requests-toolbelt==0.9.1
urllib3==1.26.10

any ideas?

robertolopezlopez commented 2 years ago

hi @phrend ,

Thank you for opening this issue ticket. From what pip freeze is showing us, you do not seem to have httpie-edgegrid installed in your VE. Maybe that's the reason.

As we have some PyPI problems publishing the latest release, for the moment I can recommend you to follow these steps to install httpie-edgegrid:

  1. git clone https://github.com/akamai/httpie-edgegrid
  2. source yourVe/bin/activate
  3. cd httpie-edgegrid
  4. python setup.py install

(Just out of my head, but I believe they will be enough)

I will close this issue now, if the problem persist please do not hesitate about reopening it.

Regards,

Roberto

phrend commented 2 years ago

My mistake - I had done pip install -r requirements.txt rather than python setup.py install Thank you for the quick reply!

alexholtz commented 1 year ago

While setting up a new mac (Apple silicon, MacOS 12.4) with httpie-edgegrid I ran into this same problem. It's a minor thing but in case it saves anyone else a few minutes I discovered that after installing with pip I had to deactivate and reactivate the venv for some reason, otherwise I was getting the same error as @phrend.

In other words:

$ python3 -m venv venv
$ . venv/bin/activate
$ pip install httpie-edgegrid
$ deactivate
$ . venv/bin/activate
Slonimskaia commented 1 year ago

Hi @alexholtz,

thank you for reporting this issue. We will try to do investigation from our side.

Best regards, Tatiana

kaush- commented 1 year ago

@alexholtz thank you for your comment.

Can we request you to open a new issue as it seems to be unrelated with the parent issue here? Also can you please provide more details, such as screenshots and some logs that will help us further deep dive into the issue.

Looking forward to hearing from you.

Regards, Piyush