akamai / cli-property-manager

Use this Property Manager CLI to automate Akamai property changes and deployments across many environments.
Apache License 2.0
29 stars 22 forks source link

Property-manager CLI requires ~/.edgerc to exist, even when --edgerc parameter is used #63

Closed joshjohnson closed 2 years ago

joshjohnson commented 3 years ago

The CLI requires ~/.edgerc to exist, even when --edgerc parameter is used to specify a different edgerc location

For example, the below command fails when there is no file present at ~/.edgerc, even though an alternate file is used by the command.

akamai property-manager activate-version -p my_property --network staging --message 'testing' --edgerc ./myAlternateEdgeRc

The error received is:

PM CLI Error: 'missing_edgegrid_credentials' occurred: 
 Can't find edgerc config. Either '/Users/username/.edgerc' or '/Users/username/currentworkingdirectory/edgerc.config' must exist

Creating an empty file at /Users/username/.edgerc or /Users/username/currentworkingdirectory/edgerc.config allows the command to succeed

This is especially impactful when a Jenkins server is using the Jenkins secrets store to manage credentials. In this case, the ~/.edgerc file does not exist. Instead, a different file path is generated automatically, and the Jenkins job may not have permissions to create the file at ~/.edgerc.

mvanhornakamai commented 3 years ago

Josh thanks for the feedback. Our team has reproduced this issue as well and are working on a fix.

SidHeg commented 3 years ago

Josh, we tried to reproduce this issue again; We couldn't. The first time when we tried, we had misspelled the "edgerc" file name (which resulted in using a non-existent file) and got the same error you have got here, but when we corrected this we did not get any errors. Can you give us your steps to reproduce the error? Thank you

vreddhi commented 3 years ago

@SidHeg We are facing a similar issue when we try to merge the template files.

For example, we expeect the below command to merge the files and NOT to validate it with backend schema. akamai pipeline merge -n -p www test

However, it errors out with: Can't find edgerc config.

This used to work perfectly fine with older releases.