This help site has been deprecated. Please send your requests to support@rubygems.org

s3_source doesn't work

Brian Auron's Avatar

Brian Auron

06 Oct, 2020 10:16 PM

Neither provider: "env" nor id: <aws_access_key_id>, secret: <aws_secret_access_key> work when used in the .gemrc file.

Both methods result in an error:

ERROR:  Could not find a valid gem 'mygem' (>= 0), here is why:
          Unable to download data from s3://bucket1 - credentials needed in s3 source, like s3://key:secret@bucket-name/ (s3://bucket1/latest_specs.4.8.gz)

I've verified that the S3 contents match what gem expects:

$ aws s3 ls s3://bucket1
                           PRE gems/
                           PRE quick/
2020-10-06 15:01:52       4608 mygem-3.0.1.gem
2020-10-06 09:58:11       4608 dec.gem
2020-10-06 15:10:33         61 latest_specs.4.8
2020-10-06 15:10:33         78 latest_specs.4.8.gz
2020-10-06 15:10:33          4 prerelease_specs.4.8
2020-10-06 15:10:33         24 prerelease_specs.4.8.gz
2020-10-06 15:10:33         61 specs.4.8
2020-10-06 15:10:33         78 specs.4.8.gz

Any help is much appreciated, thanks!

  1. Support Staff 1 Posted by sonalkr132 on 07 Oct, 2020 06:04 AM

    sonalkr132's Avatar

    Hi Brian,

    Can you please show us your ,gemrc? make sure you have masked id, secret, and any other sensitive info before sharing.
    Also, please confirm that sources value ends with a trailing slash and you have specified the region of the bucket.

  2. 2 Posted by Brian Auron on 08 Oct, 2020 04:02 PM

    Brian Auron's Avatar

    Hello,

    I've tried both of these, and `echo $AWS_<variables>` to make sure the env
    was correct in the first case:

    *:sources:
    - s3://myBucket/
    s3_source: {
      myBucket: {
        provider: "env",
        region: "us-west-2"
      },
    }*

    :sources:
    - s3://myBucket/
    s3_source: {
      myBucket:
        id: "omitted",
        secret: "omitted_also",
        secret_token: "omitted_also_also", region: "us-west-2"
      }
    }

    Thanks!

    -Brian

  3. Support Staff 3 Posted by sonalkr132 on 13 Oct, 2020 04:27 AM

    sonalkr132's Avatar

    Your config seems correct to me. What the version of your rubygems gem -v? Can you please try gem install mygem --verbose and send us the output? Does gem install mygem -v 3.0.1 --source s3://<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>@bucket1 also not work for you?

Discussions are closed to public comments.
If you need help with RubyGems.org please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac