chaostoolkit-attic / chaoshub-archive

[ARCHIVED] ChaosHub - Your Chaos Engineering Control Plane
https://chaoshub.org/
GNU Affero General Public License v3.0
15 stars 3 forks source link

I can't seem to be able to do a `chaos login` successfully #12

Open nnarendravijay opened 6 years ago

nnarendravijay commented 6 years ago

By following the standard procedure to log in to the hub :

Chaos Hub Url [https://chaoshub.com]: http://localhost:8080 Chaos Hub Token: Traceback (most recent call last): File "/Users/fjl054/.venvs/chaostk/bin/chaos", line 11, in sys.exit(cli()) File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 535, in invoke return callback(args, *kwargs) File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), args, **kwargs) File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/chaoshub/cli.py", line 32, in login set_chaos_hub_settings(hub_url, token, settings) File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/chaoshub/settings.py", line 13, in set_chaos_hub_settings if 'auths' not in settings: TypeError: argument of type 'NoneType' is not iterable

Python Version 3.7.0

Lawouach commented 6 years ago

I think this should move to https://github.com/chaostoolkit/chaostoolkit-chaoshub which is the Chaos Toolkit extension client for the chaoshub (hence the one breaking here).

Lawouach commented 5 years ago

Right,

So untile we fix this, the first time you should manually add the credentials to ~/.chaostoolkit/settings.yaml:

Just add a top-level entry as follows:

auths:
  127.0.0.1:8080:
    type: bearer
    value: <TOKEN>

The key is the domain where the hub responds to (here on 127.0.0.1:8080) and the token is the token you generated on the hub.

Once the first entry exists, future call to chaos login should work nicely.

akhileshsarfare commented 4 years ago

@Lawouach : I am facing the same issue. How do I locate SETTINGS.YAML file? Tried FIND command on Linux (EC2 instance), did not find.

Note: I am running ChaosToolkit from within a virtual environment (Python).

akhileshsarfare commented 4 years ago

Right,

So untile we fix this, the first time you should manually add the credentials to ~/.chaostoolkit/settings.yaml:

Just add a top-level entry as follows:

auths:
  127.0.0.1:8080:
    type: bearer
    value: <TOKEN>

The key is the domain where the hub responds to (here on 127.0.0.1:8080) and the token is the token you generated on the hub.

Once the first entry exists, future call to chaos login should work nicely.

Hi, I created settings.yaml file as shown above. Still the output is same. I provided IP ADDRESS OF THE CONTAINER which is running ChaosHub.

curl does return ChaosHub homepage. CHAOS LOGIN command still fails.