question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Host ... returned an invalid certificate" when using gsutil rsync with a s3 bucket that has dots in its name.

See original GitHub issue

Using gsutil rsync with a bucket whose name contains dots causes the following error:

$ gsutil rsync s3://xxxxxx.xxxxxx.xxxxxxxx.xxxxxxxxxxx/ gs://xxxxxxx-xxxxxxx-x/
Building synchronization state...
Caught non-retryable exception while listing s3://xxxxxx.xxxxxx.xxxxxxxx.xxxxxxxxxxx/: Host
xxxxxx.xxxxxx.xxxxxxxx.xxxxxxxxxxx.s3.amazonaws.com returned an invalid certificate (remote
hostname "xxxxxx.xxxxxx.xxxxxxxx.xxxxxxxxxxx.s3.amazonaws.com" does not match certificate):
{
  'notAfter': 'Jun  5 23:59:59 2015 GMT',
  'subjectAltName': (
                      (u'DNS', '*.s3.amazonaws.com'),
                      (u'DNS', 's3.amazonaws.com')
                    ),
  'subject': (
               (('countryName', u'US'),),
               (('stateOrProvinceName', u'Washington'),),
               (('localityName', u'Seattle'),),
               (('organizationName', u'Amazon.com Inc.'),),
               (('organizationalUnitName', u'S3-A'),),
               (('commonName', u'*.s3.amazonaws.com'),)
             )
}

It is possible to circumvent that problem by using https://s3-<region>.amazonaws.com/xxxxxx.xxxxxx.xxxxxxxx.xxxxxxxxxxx as the URL instead; but gsutil does not construct endpoints with that form even in the case of dotted names, causing the error.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
kuzaxakcommented, May 29, 2020

Append the next section to ~/.boto file:


[s3] 
calling_format = boto.s3.connection.OrdinaryCallingFormat
host = s3-eu-west-1.amazonaws.com

It will fix the issue. Replace region if you need.

6reactions
7heocommented, Jul 17, 2019

Nope. Never will.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Host ... returned an invalid certificate" when using gsutil rsync ...
Using gsutil rsync with a bucket whose name contains dots causes the following error:
Read more >
gsutil rsync with s3 buckets gives InvalidAccessKeyId error
I have the AWS CLI installed which is working fine with the same AccessKeyId and listing buckets as well as objects in the...
Read more >
Interoperability with other storage providers - Google Cloud
If you attempt to use gsutil to access an Amazon S3 bucket that contains a dot in its name, you might receive an...
Read more >
rclone(1) — Arch manual pages
Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces. Over...
Read more >
rclone(1) - Debian Manpages
Rclone has powerful cloud equivalents to the unix commands rsync, cp, mv, mount, ... which can't have empty directories (eg s3, swift, gcs,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found