bengro
bengro

Reputation: 1014

Deploy from Travis to Cloud Foundry

I'm trying to deploy an app from Travis to Cloud Foundry.

My .travis.yml looks like this:

deploy:
  provider: cloudfoundry
  api: https://api.run.pivotal.io
  username:
    secure: "... secure username, generated with travis cli"
  password:
    secure: "... secure password, generated with travis cli"
  organization: my-org
  space: development
  on:
    repo: username/repository
    branch: master

Organization, space, repository, encrypted username and password are double checked and are correct.

Yet, travis log tells me:

Installing deploy dependencies
Preparing deploy
cf
Setting api endpoint to https://api.run.pivotal.io...
OK

API endpoint:   https://api.run.pivotal.io (API version: 2.37.0)   
Not logged in. Use 'cf login' to log in.
API endpoint: https://api.run.pivotal.io
Authenticating...
Credentials were rejected, please try again.

Logging in manually works like a charm. Anyone an idea what the problem could be?

I'm not sure whether it's me, travis or cloud foundry (PWS) that cocks up.

Upvotes: 2

Views: 750

Answers (1)

Erds
Erds

Reputation: 523

I ran into the same issue and discovered that I had special characters in my password.

If your password contains special characters, then when calling travis encrypt at the command line you need to enclose your password in quotes and escape the special characters.

Details can be seen here: http://docs.travis-ci.com/user/encryption-keys/#Note-on-escaping-certain-symbols

Upvotes: 3

Related Questions