Grozz
Grozz

Reputation: 8425

Encrypting keys for deploy section in Travis CI

I'm trying to do a deploy to S3 bucket from Travis CI S3: http://docs.travis-ci.com/user/deployment/s3/

Encrypting keys using the process described in http://docs.travis-ci.com/user/encryption-keys/

When the keys do not require escaping everything works fine, but when they do as far as I understand there are two options:

  1. escape with quotes and double backslash "\\<symbol>"
  2. escape with single quotes and backslash '\<symbol>'

Both fail with: Aws Secret Key does not match Access Key Id, Stopping Deploy

Any idea how to get around that? Is that a known bug?

Upvotes: 3

Views: 733

Answers (1)

Luke Exton
Luke Exton

Reputation: 3676

In your specific example, the double quotes would only need a single escaping backslash, and the single quotes would need none. There are specific notes on this case here.

The strings will be processed in the same way that bash processes strings.

The simplest way would be to single quote it and have it read each of the characters as a literal (reads as ascii directly). Alternatively if it is double quoted it will be subject to Shell Expansion and special characters will need to be escaped.

Clear documentation on each case can be found here:

Single Quote GNU Man Page

Double Quote GNU Man Page

Upvotes: 1

Related Questions