Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add command line options for AWS access key and secret key #54

Merged
merged 1 commit into from

3 participants

@sweenzor

I'd like to be able to run s3cmd without having to configure the entire application, This pull adds the appropriate options.

Based on this suggestion:
http://sourceforge.net/projects/s3tools/forums/forum/618865/topic/4636398?message=10564589

@mludvig mludvig merged commit 5b432a5 into from
@clintonb

This feature doesn't seem to work. Using 1.5.0-alpha3, executing a the command similar to the example below resulted in an error due to the configuration file not being present. If these parameters are being passed on the command line, the file should not be required.

$ s3cmd --access_key=xxx --secret_key=yyy get s3://file-path.txt
ERROR: /home/ec2-user/.s3cfg: None
ERROR: Configuration file not available.
ERROR: Consider using --configure parameter to create one.

$ s3cmd --version
s3cmd version 1.5.0-alpha3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  s3cmd
View
2  s3cmd
@@ -1481,6 +1481,8 @@ def main():
optparser.add_option( "--configure", dest="run_configure", action="store_true", help="Invoke interactive (re)configuration tool. Optionally use as '--configure s3://come-bucket' to test access to a specific bucket instead of attempting to list them all.")
optparser.add_option("-c", "--config", dest="config", metavar="FILE", help="Config file name. Defaults to %default")
optparser.add_option( "--dump-config", dest="dump_config", action="store_true", help="Dump current configuration after parsing config files and command line options and exit.")
+ optparser.add_option( "--access_key", dest="access_key", help="AWS Access Key")
+ optparser.add_option( "--secret_key", dest="secret_key", help="AWS Secret Key")
optparser.add_option("-n", "--dry-run", dest="dry_run", action="store_true", help="Only show what should be uploaded or downloaded but don't actually do it. May still perform S3 requests to get bucket listings and other information though (only for file transfer commands)")
Something went wrong with that request. Please try again.