Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting POLOLENDER_APIKEY via "heroku config:set" command is ingesting key/secret values improperly #41

Closed
sunweiyang opened this issue May 25, 2017 · 4 comments

Comments

@sunweiyang
Copy link

While following the instructions for setting up poloLender in Heroku, I attempted to set my environmental variable using the following command:
heroku config:set POLOLENDER_APIKEY={\"key\":\"MYKEY\",\"secret\":\"MYSECRET\"}

This resulted in the following output, which suggested that only the "secret" value was ingested (no "key" value):
Setting POLOLENDER_APIKEY, POLOLENDER_APIKEY and restarting ⬢ rocky-atoll-57901... done, v17 POLOLENDER_APIKEY: "secret":"MYSECRET"

Sure enough, "heroku config" shows only the "secret" value. This issue causes app deployment to fail.

@sunweiyang sunweiyang changed the title Setting POLOLENDER_APIKEY via "heroku config:set" ingesting my key/secret values improperly Setting POLOLENDER_APIKEY via "heroku config:set" command is ingesting key/secret values improperly May 25, 2017
@dutu
Copy link
Owner

dutu commented May 25, 2017

@sunweiyang , could you let me know the heroku config:set command you are using and its output?
Please just replace with * characters from the key and secret and copy+paste.

@sunweiyang
Copy link
Author

sunweiyang commented May 25, 2017

Here are my heroku config:set and heroku config commands. I've obfuscated my own key and secret values.

You'll notice that I have only ETH listed in my POLOLENDER_LENDMAX and POLOLENDER_MINRATE environment variables. That's because when I try to have both BTC and ETH, the same thing happens; only the last key-value pair gets set.

$ heroku config:set POLOLENDER_APIKEY={\"key\":\"------------------\",\"secret\":\"------------------\"}
Setting POLOLENDER_APIKEY, POLOLENDER_APIKEY and restarting ⬢ rocky-atoll-57901... done, v17
POLOLENDER_APIKEY: "secret":"------------------"
$ heroku config
=== rocky-atoll-57901 Config Vars
PAPERTRAIL_API_TOKEN:      ------------------
POLOLENDER_APIKEY:         "secret":"------------------"
POLOLENDER_LENDMAX:        {"ETH":"#"}
POLOLENDER_MINRATE:        {"ETH":"#"}
POLOLENDER_REPORTINTERVAL: 30
POLOLENDER_STARTBALANCE:   {"#"}
POLOLENDER_STARTTIME:      2017-05-24T10:17:00+07:00

@dutu
Copy link
Owner

dutu commented May 25, 2017

it looks that on Ubuntu you have to use this format

heroku config:set POLOLENDER_APIKEY='{"key":"----","secret":"-----"}'

@Shoananas
Copy link

For those who may have similar errors, you can setup the config vars through the Heroku website, the last tab when you browse your app on Heroku lets you edit the config vars and it restarts the app automatically to apply the new values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants