0

When I type

heroku config:set SECRET_KEY='x%_jcw%#a$qsv8)eyh+f_^#!xzx($wm0xrlk9!^(h=pjz*q3g='

on my Powershell I got this error:

eyh+f_#!xzx($wm0xrlk9!(h was unexpected at this time.

Please tell me if you know how to solve this. Thank you

  • Cant you simply just add the secret key to an .env file ? And then use its value using decouple ? – user655941 Aug 11 '21 at 09:58
  • at Heroku there is Config Vars and with os.environ("key name") you can access it – yotam rec Aug 11 '21 at 10:00
  • Moreover if you are having problems with the powershell why not use the heroku dashboard. – user655941 Aug 11 '21 at 10:04
  • [It looks like single-quoting the value should do the trick](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules), as you've tried. Can you share the specific character(s) that are appearing in the error message? Or even the complete secret key and error message (of course you'd want to [generate a new one after doing so](https://stackoverflow.com/q/41298963/354577) since `SECRET_KEY`s should never be shared.) – ChrisGPT was on strike Aug 11 '21 at 13:12
  • That's my complete secret key – Cryptic-titan Aug 12 '21 at 03:39

1 Answers1

0

I would recommend you switch to cmd, so you can run this command as it is, or you may modify it by escaping special characters as described for example like ")" character, but it probably might not works with a too complex strings.

Egor
  • 403
  • 4
  • 6