0

I have a local git repo and I am trying to do continuous integration and deployment using Codeship. https://documentation.codeship.com

I have the github hooked up to the continuous integration and it seems to work fine.

I have an AWS account and a bucket on there with my access keys and permissions.

When I run the deploy script I get this error: enter image description here

How can I fix the error?

user1261710
  • 2,539
  • 5
  • 41
  • 72

2 Answers2

0

I had this very issue when using aws-cli and relying on the following files to hold AWS credentials and config for the default profile:

  • ~/.aws/credentials
  • ~/.aws/config

I suspect there is an issue with this technique; as reported in github: Unable to locate credentials

I ended up using codeship project's Environment Variables for the following:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Now, this is not ideal. However my AWS-IAM user has very limited access to perform the specific task of uploading to the bucket being used for the deployment.

Nigel
  • 471
  • 4
  • 13
0

Alternatively, depending on your need, you could also check out the Codeshop Pro platform; it allows you to have an encrypted file with environment variables that are decrypted at runtime, during your build.

On both Basic and Pro platforms, if you want/need to use credentials in a file, you can store the credentials in environment variables (like suggested by Nigel) and then echo it into the file as part of your test setup.