Posts

Showing posts from December, 2015

Soving AccessDenied on Google Cloud Storage domain mapping

As I was facing this again trying to create amp pages for my main site www.tekartik.com , here is a concrete example for my changes Adding the proper DNS redirection in my domain provider (OVH in my case) www.tekartik.com. CNAME c.storage.googleapis.com. This was first giving the error: <Error>   <Code>AccessDenied</Code>   <Message>Access denied.</Message>   <Details>Anonymous callers do not have storage.objects.list access to bucket www.tekartik.com.</Details> </Error> the solution was to configure my bucket as a website configuration : gsutil web set -m index.html -e 404.html gs://www.tekartik.com And to make all files I add public by default and not worry about ACL anymore, I can use gsutil defacl ch -u AllUsers:R gs://www.tekartik.com To make previous imported files public, I can use gsutil -m acl -r set public-read gs://www.tekartik.com

Mercurial back in time, going back to a previous revision

After making some changes in a project and finally forking part of it into another project, I wanted to get back in time to the state where it was 2 days ago. I really did not want to create a new branch but rather have repository matching the state it was 2 days ago (i.e. the files added are then removed but still in the history). The easiest I found out was to find the last revision I wanted to included in my bitbucket project and then do: hg revert --all --rev <my_rev> hg commit -m "revert to <my_rev>"