I cannot get the login to accept a lifetime longer than 7 days. Is this the max lifetime allowable?
Also, is there a way to check how much time you have left in your credential?
The maximum lifetime for a token is indeed 7 days.
Checking how much time is left is scriptable albeit not entirely trivial. Did you mean to incorporate this in a particular process? I can try and provide you with some relevant sample code if so.
Yes, I have a bash deploy script I’m working on and want to be able to see
if the cred is still good for at least an hour before it will run. Thanks.
To achieve this goal, instead of relying on an existing token, I’d recommend running
aptible login in your script in order to generate a new token before running any additional Aptible CLI commands, and setting a
--lifetime greater than 1 hour. (The default lifetime is 12 hours, so should suffice for this case.)