eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.47k stars 315 forks source link

Can't deploy #113

Closed jessfraz closed 9 years ago

jessfraz commented 9 years ago

Stack trace

jessie at debian in ~/jessieland on master [!]
$ cactus deploy
Plugins: version, blog
/usr/local/lib/python2.7/site-packages/django/contrib/markup/templatetags/markup.py:52: DeprecationWarning: The markdown filter has been deprecated
  category=DeprecationWarning)

Building error.html
Building index.html
Building posts/how-to-make-foursquare-your-bitch.html
Building posts/linux-on-mac.html
Building posts/what-would-2pac-do.html
Building robots.txt
Building sitemap.xml
Amazon secret access key (will be saved in keychain): MY_TOKEN
sh: 1: security: not found
S3 bucket name (www.yoursite.com): blog.jessfraz.com
Traceback (most recent call last):
  File "/usr/local/bin/cactus", line 9, in <module>
    load_entry_point('Cactus==2.3.1', 'console_scripts', 'cactus')()
  File "/usr/local/lib/python2.7/site-packages/cactus/cli.py", line 90, in main
    deploy(os.getcwd())
  File "/usr/local/lib/python2.7/site-packages/cactus/cli.py", line 42, in deploy
    site.upload()
  File "/usr/local/lib/python2.7/site-packages/cactus/site.py", line 335, in upload
    self.config.set('aws-bucket-website', self.bucket.get_website_endpoint())
  File "/usr/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 1558, in get_website_endpoint
    l.append(S3WebsiteEndpointTranslate.translate_region(self.get_location()))
  File "/usr/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 1133, in get_location
    query_args='location')
  File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 664, in make_request
    retry_handler=retry_handler
  File "/usr/local/lib/python2.7/site-packages/boto/connection.py", line 1070, in make_request
    retry_handler=retry_handler)
  File "/usr/local/lib/python2.7/site-packages/boto/connection.py", line 942, in _mexe
    request.body, request.headers)
  File "/usr/local/lib/python2.7/httplib.py", line 1001, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/lib/python2.7/httplib.py", line 1035, in _send_request
    self.endheaders(body)
  File "/usr/local/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/local/lib/python2.7/httplib.py", line 850, in _send_output
    self.send(msg)
  File "/usr/local/lib/python2.7/httplib.py", line 812, in send
    self.connect()
  File "/usr/local/lib/python2.7/httplib.py", line 1212, in connect
    server_hostname=server_hostname)
  File "/usr/local/lib/python2.7/ssl.py", line 350, in wrap_socket
    _context=self)
  File "/usr/local/lib/python2.7/ssl.py", line 566, in __init__
    self.do_handshake()
  File "/usr/local/lib/python2.7/ssl.py", line 796, in do_handshake
    match_hostname(self.getpeercert(), self.server_hostname)
  File "/usr/local/lib/python2.7/ssl.py", line 269, in match_hostname
    % (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname u'blog.jessfraz.com.s3.amazonaws.com' doesn't match either of '*.s3.amazonaws.com', 's3.amazonaws.com'
jessfraz commented 9 years ago

python version 2.7.9

jessfraz commented 9 years ago

closing, found a way around it, wasn't exactly glamorous, but did the trick :)

koenbok commented 9 years ago

Hey @jfrazelle good to hear. I also just made v3 the official version.

jessfraz commented 9 years ago

Oooooo shiny, cactus is awesome btw, keep up the amazing work :)

On Sat, Jan 17, 2015 at 1:56 PM, Koen Bok notifications@github.com wrote:

Hey @jfrazelle https://github.com/jfrazelle good to hear. I also just made v3 the official version.

— Reply to this email directly or view it on GitHub https://github.com/koenbok/Cactus/issues/113#issuecomment-70386064.

Jessie Frazelle 4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3 pgp.mit.edu http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3

koenbok commented 9 years ago

Docker is pretty cool too ;-)

krallin commented 9 years ago

Hey @jfrazelle ,

This is actually a bug in Boto, where SSL certificate verification isn't disabled for S3 when using Python 2.7.9 (whereas it is when using an earlier version).

Here's a workaround (through boto configuration): https://github.com/boto/boto/issues/2836

@koenbok, I think we might be able to force the subdomain calling format for S3 in Cactus (and also force SSL verification, while we're at it). I'll look into that.

Cheers,

rh0dium commented 9 years ago

Hey @krallin what was your ugly workaround?

krallin commented 9 years ago

@rh0dium

Using the following boto configuration fixes the problem:

[s3]
calling_format = boto.s3.connection.OrdinaryCallingFormat
davidbenque commented 9 years ago

@krallin sorry relative noob here. Could you explain how to implement this workaround in the mac os app? I made it to the package contents source and '''calling_format = boto.s3.connection.OrdinaryCallingFormat''' is not there.

krallin commented 9 years ago

I wouldn't know how to do in the Mac app, no, I'm sorry (I have not worked on it).

Did you try putting the snipped I posted above in ~/.boto?

Maybe @koenbok can help.

offinga commented 9 years ago

@krallin Wanted to let you know that adding that snippet also fixes the issue with the Mac app. Hoping this gets fixed for real though.

davidbenque commented 9 years ago

@thomasoffinga sorry if its a silly question but where do you add the snippet?

krallin commented 9 years ago

@davidbenque in ~/.boto.