Skip to content
New issue

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

Exception when $HOME/.aws is not present #34

Open
gmd3b opened this issue Nov 3, 2022 · 0 comments
Open

Exception when $HOME/.aws is not present #34

gmd3b opened this issue Nov 3, 2022 · 0 comments
Assignees

Comments

@gmd3b
Copy link
Contributor

gmd3b commented Nov 3, 2022

In the event the ~/.aws directory is not present, igor will fail to populate ~/.aws/credentials with the following exception :

➜  d3b-cli-igor git:(main) ./igor awslogin
Available logins:
1) awslogin Mgmt-Console-Dev-include@373997854230
2) awslogin Mgmt-Console-Dev-D3b@538745987955
Please choose your option:
1
Traceback (most recent call last):
  File "/opt/homebrew/bin/saml-login", line 33, in <module>
    sys.exit(load_entry_point('auth0-login==0.6.1', 'console_scripts', 'saml-login')())
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/auth0_login-0.6.1-py3.10.egg/auth0_login/aws/sts_command.py", line 116, in assume_role_with_saml
    cmd.run()
  File "/opt/homebrew/lib/python3.10/site-packages/auth0_login-0.6.1-py3.10.egg/auth0_login/aws/sts_command.py", line 92, in run
    write_aws_credentials(credentials, self.profile)
  File "/opt/homebrew/lib/python3.10/site-packages/auth0_login-0.6.1-py3.10.egg/auth0_login/aws/credentials.py", line 40, in write_aws_credentials
    with open(filename, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/gmd3b/.aws/credentials'

Expected behaviour:
The directory is created prior to auth0_login/aws/credentials.py is invoked.

@gmd3b gmd3b self-assigned this Nov 3, 2022
gmd3b pushed a commit that referenced this issue Nov 3, 2022
alubneuski pushed a commit that referenced this issue Nov 3, 2022
Co-authored-by: Gregory M <gregory@movia.media>
chris-s-friedman added a commit that referenced this issue Feb 13, 2023
## Release v0.2.0

# Initial d3b-release-maker release

First release using d3b-release maker. Has all of the recent changes since the last manual release.

### Summary

- Emojis: 📝 x1, 🔧 x1, 🚸 x1, ? x9, 🐛 x1, ✨ x2, 🛂 x1
- Categories: Additions x2, Documentation x1, Fixes x2, Ops x1, Other Changes x10

### New features and changes

- [#39](#39) - 📝 add pipx install instructions - [2793465](2793465) by [chris-s-friedman](https://github.com/chris-s-friedman)
- [#38](#38) - 🔧 setup repo to use the d3b-release maker - [d757b78](d757b78) by [chris-s-friedman](https://github.com/chris-s-friedman)
- [#37](#37) - 🚸 Link to aws account notion page - [531216f](531216f) by [chris-s-friedman](https://github.com/chris-s-friedman)
- [#35](#35) -  #34 Create ~/.aws directory when not present - [ea61ea3](ea61ea3) by [gmd3b](https://github.com/gmd3b)
- [#32](#32) -  Fix dev env tunnel script skfp 412 - [149cd08](149cd08) by [evans-g-crsj](https://github.com/evans-g-crsj)
- [#31](#31) -  Remove bad trap SIGINT - [d8f6994](d8f6994) by [devbyaccident](https://github.com/devbyaccident)
- [#30](#30) - 🐛 Fix var spacing in template - [3a7fc3a](3a7fc3a) by [devbyaccident](https://github.com/devbyaccident)
- [#29](#29) - ✨ Add dev onboarding role - [88b0c69](88b0c69) by [devbyaccident](https://github.com/devbyaccident)
- [#26](#26) - ✨ Add include bastion host - [8953007](8953007) by [devbyaccident](https://github.com/devbyaccident)
- [#27](#27) - 🛂 Adding codeowners file - [9cd73fb](9cd73fb) by [devbyaccident](https://github.com/devbyaccident)
- [#24](#24) -  Bugfix/deployment files - [ce71c2c](ce71c2c) by [alubneuski](https://github.com/alubneuski)
- [#23](#23) -  Bugfix/deployment files - [1c3a742](1c3a742) by [alubneuski](https://github.com/alubneuski)
- [#21](#21) -  ✔️ Added validation for config_file being in the same… - [163ad98](163ad98) by [alubneuski](https://github.com/alubneuski)
- [#22](#22) -  Feature/add check for creds - [fd97dc6](fd97dc6) by [alubneuski](https://github.com/alubneuski)
- [#20](#20) -  Feature/add include - [3541cac](3541cac) by [alubneuski](https://github.com/alubneuski)
- [#19](#19) -  Added accounts_info.json to igor - [c7b1340](c7b1340) by [alubneuski](https://github.com/alubneuski)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant