flyctl secrets set SEARCH_CONSOLE_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BA\nvnwq7Zd3diJpxE46aRQwlJ9LRNitjt2/OUcXkc7AIy7xasAl8c0jADttPpW26Slk\nd/VCCxH7JssXsV8dHvn1Xc3r\n-----END PRIVATE KEY-----\n
Error Im getting :
Error could not parse secrets: ‘PRIVATE’: must be in the format NAME=VALUE
next I tried passing through fly.toml
Error I got : Error failed loading app config from C:\Users\Administrator\xxx\fly.toml: toml: line 9 (last key “env.SEARCH_CONSOLE_PRIVATE_KEY”): expected a digit but got ‘-’
Searching online hasnt been fruitful. Please help me out.
Well first, if that was the real value, as @ignoramous says, rotate it. Which would mean at the very least it needs updating in Fly or Google.
You can check whether Fly has done its bit by connecting to your app instance by running fly ssh console from the folder your fly.toml file is in. That should load you into the vm, and then run e.g echo $SEARCH_CONSOLE_PRIVATE_KEY. If that shows you your private key, well Fly’s bit is done at that point. You provided an environment variable, and in turn Fly passed it to the vm when it booted. Beyond that point, it’s down to what you do with it in your code/SDK.
On the other hand if the value is not shown, well yes, that would be an issue with how the secret is being passed in. In which case check out what @ignoramous suggests about loading it from a file instead.
Yes the both Private and Email are showing as they were entered and without " ". So the values are passed on correctly. Guess its not on Fly.io anymore but the developer side.
also the value I posted above is was 5% of the actual keys so its safe.
Thanks again guys. I’ll try checking through the coding part for the issue and update here once it starts working. Im really impressed with the active community.
@ignoramous@greg As I promised I’ll update this thread if this is resolved. This has been resolved. seems like implementation of script was at domain Level while I was running at url level. I had to verify the domain in Google Search Console using DNS and it sorted the issue. Your provided steps were correct for entering the keys.