Hello. I just tried to PR my app and keeps failing.
I have encrypt the API key using PowerShell and command
pixlet encrypt ISS "MY-SECRET-API-KEY"
(ISS is my app name)
when I run the code:
def main(config):
api_key = secret.decrypt("AV6+xWcEI9kUxz7pH8hzcZ6lekCk18gWTFtZA3vzx1p8SXa82ZJBMUEQaY2pA1GDLxP4X3yYFzrN67eflXmwgzxWcByF3lfVqNC1Ox76cV5C/3MdBWPZUu1VsYphn8SPzAuw1NWpTG9v6AlOFCzig29BZSlVrmZNbRXxr670LQ==")
url = 'https://api.n2yo.com/rest/v1/satellite/visualpasses/%s/%s/%s/%s/%s/%s/&apiKey=%s' % (SAT_ID, lat, lng, ALTITUDE, NUM_DAYS, MIN_DURATION, api_key)
data = get_data(url)
it fails either locally (expected) but also when I PR to tidbyt Github
“Build and Test / check (pull_request) Failing after 8s”
However, if i use unencrypted API, it works, like this:
def main(config):
api_key = MY-SECRET-API-KEY
url = 'https://api.n2yo.com/rest/v1/satellite/visualpasses/%s/%s/%s/%s/%s/%s/&apiKey=%s' % (SAT_ID, lat, lng, ALTITUDE, NUM_DAYS, MIN_DURATION, api_key)
data = get_data(url)
I am importing secrets module.
So, any help?
Thanks