GuildEducationInc / aws-jumpcloud

DEPRECATED: aws-vault like tool for JumpCloud authentication
MIT License
17 stars 8 forks source link

OnePasswordNotSignedIn__init error #28

Open qhartman opened 4 years ago

qhartman commented 4 years ago

I have one-password CLI installed and signed in via: eval $(op signin guild_education) After entering that command I can correctly list my vaults with op list vaults.

When I try to use aws-jumpcloud, I get:

aws-jumpcloud exec dev -- aws s3 ls
Traceback (most recent call last):
  File "/home/qhartman/.local/bin/aws-jumpcloud", line 10, in <module>
    sys.exit(main())
  File "/home/qhartman/.local/lib/python3.7/site-packages/aws_jumpcloud/cli.py", line 18, in main
    args.func(args)
  File "/home/qhartman/.local/lib/python3.7/site-packages/aws_jumpcloud/commands.py", line 99, in exec_command
    session = _get_aws_session(args.profile)
  File "/home/qhartman/.local/lib/python3.7/site-packages/aws_jumpcloud/commands.py", line 191, in _get_aws_session
    _login_to_aws(keyring, profile)
  File "/home/qhartman/.local/lib/python3.7/site-packages/aws_jumpcloud/commands.py", line 281, in _login_to_aws
    session = _login_to_jumpcloud(profile.name)
  File "/home/qhartman/.local/lib/python3.7/site-packages/aws_jumpcloud/commands.py", line 247, in _login_to_jumpcloud
    email = _get_email()
  File "/home/qhartman/.local/lib/python3.7/site-packages/aws_jumpcloud/commands.py", line 205, in _get_email
    if op.installed():
  File "/home/qhartman/.local/lib/python3.7/site-packages/aws_jumpcloud/onepassword.py", line 16, in installed
    raise OnePasswordNotSignedIn()
  File "/home/qhartman/.local/lib/python3.7/site-packages/aws_jumpcloud/onepassword.py", line 67, in __init__
    Exception.__init(self, message)
AttributeError: type object 'Exception' has no attribute '_OnePasswordNotSignedIn__init'

I get the same error even if I am not signed in.

thejchap commented 4 years ago

this is happening for me too

ionosphere80 commented 4 years ago

Same.

ryanadean commented 4 years ago

I had the same problem. @thejchap let me know what he did, and it worked wonders:

  1. Fully remove the old install (if you used brew, use the brew uninstall --force aws-jumpcloud command).
  2. Install a prior version 2.1.1 worked for me using pip pip3 install https://github.com/GuildEducationInc/aws-jumpcloud/archive/2.1.1.tar.gz
  3. Profit?
shouser commented 3 years ago

I just ran into, and figured this one out.

op signin sets only one env var which is OPSESSION{subdomain} not OP_SUBDOMAIN

This tool only works if OP_SUBDOMAIN is configured.

You can fix this by running or adding an export OP_SUBDOMAIN={subdomain} to your bash profile or bashrc.

ghost commented 3 years ago

Although @shouser hit the issue on the head, there should be a setting to prevent aws-jumpcloud from using 1pass if desired, as mentioned in https://github.com/GuildEducationInc/aws-jumpcloud/issues/47.

damonconway commented 2 years ago

shouser's comment worked for me. Could the resolution to the ticket be adding that to the README?