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

The configure command writes out cred vars to shared credentials file #916

Merged
merged 2 commits into from
Sep 23, 2014

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Sep 19, 2014

Fixes #847. The change is implemented as specified in the issue:

  • Anytime you set credential variables (access_key/secret_key/session_token)
    using the configure command or the configure set command, the
    values are always written to ~/.aws/credentials.
  • Getting access_key/secret_key/session_token will look in the
    shared credentials file first before looking in the CLI config file.

This does not do anything with automatically migrating over to the
shared credentials file, that is, if you have credentials in the CLI
config file and you run aws configure and hit enter 4 times, we
will not write out values to the shared credentials file because
there are no new values to write out.

cc @danielgtaylor @kyleknap

Cleaned up the code a bit before making feature changes.
Fixes aws#847.  The change is implemented as specified in the issue:

* Anytime you set credential variables (access_key/secret_key/session_token)
  using the `configure` command or the `configure set` command, the
  values are always written to `~/.aws/credentials`.
* Getting access_key/secret_key/session_token will look in the
  shared credentials file first before looking in the CLI config file.

This does *not* do anything with automatically migrating over to the
shared credentials file, that is, if you have credentials in the CLI
config file and you run `aws configure` and hit enter 4 times, we
will not write out values to the shared credentials file because
there are no new values to write out.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) when pulling af9ed80 on jamesls:creds-file-default into 0f0000a on aws:develop.

@kyleknap
Copy link
Contributor

LGTM

be created. Any parent directories will also be created
if necessary.
* If the section to update does not exist, it will be created.
* Any existing lines that specified by ``new_values``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar: are specified?

@danielgtaylor
Copy link
Contributor

LGTM 🚢-it!

@jamesls
Copy link
Member Author

jamesls commented Sep 23, 2014

Thanks, I'll get this feedback incorporated and merge to develop.

@jamesls jamesls merged commit af9ed80 into aws:develop Sep 23, 2014
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

Successfully merging this pull request may close these issues.

Proposal: Integrate better with the shared credentials file
4 participants