Where is my private key located?

I had to reinstall windows from scratch. After installing everything, I get an error message during compilation that my private key could not be located.

Can I just generate a new one, or would that cause troubles? If so, where do I look for, what filename/extention/location in my backups? 

  • You can't recover it and without it, you can't update any of your apps in the store. Maybe you can find it in a backup, the name, location and extension can be anything though

    If you can't find it, create a new one and save it off some place you know (cloud/flash drive/etc).  You'll need to load a different version of your apps to the store with a new appid.

  • If so, where do I look for, what filename/extention/location in my backups? 

    If you generated your private key using the Monkey C VS Code extension, it should be called developer_key. (The filename is chosen for you, you only choose the output folder.)

    It may also be called developer_key.der, if you used Garmin's instructions for generating a key on the command line.

  • Thanks. It's not in my backup. So it does not correspond with my Merchant Account? That's a big pitty for paying customers then, not receiving new updates.

  • So it does not correspond with my Merchant Account?

    Garmin doesn't have your private key, regardless of you having a merchant account or not.

    This is by design, to prevent anyone else -- including Garmin -- from impersonating you and taking over your apps.

    Thanks. It's not in my backup

    There's an outside chance that you somehow named the key something else. Did you back up your entire user profile, including \Users\YOUR_USERNAME\AppData\Roaming?

    The VS Code settings file should be located at \Users\YOUR_USERNAME\AppData\Roaming\Code\settings.json

    If you have this file in your backup, search for "monkeyC.developerKeyPath". The value of this key should contain the full path to your developer key (folder path + filename).

  • Nope, it is a goner. I assumed in those directories (that normally are even not visible to users) there would be nothing that would be that valuable. I must have overlooked the notice from Garmin that it is this important, twice.

  • I assumed in those directories (that normally are even not visible to users) there would be nothing that would be that valuable.

    In general I would assume that everything under %USERPROFILE% (\Users\YOUR_USERNAME\) is worth backing up, even if it's not critical data, with the exception of temporary folders (like %TEMP% / \Users\YOUR_USERNAME\Local\Temp).

    Even if that stuff isn't always super critical, it does represent application data that you might want to preserve (like app state, settings, etc).

  • Yeah, I have that thing that sometimes I want to discard all of my personal settings because it get's a bit of a mess over time :D . Fun thing is I'm leaving the windows beta program as I'm using the system more seriously and wanted it to be more stable. I'll store the key some place that is in the backup procedure.

  • Once you have a key, it won't change, so as long as you have it saved off, you got it.  Mine is on my Google Drive as well as a flash drive I store away from home.

    People that paid for your app might not be happy that you can't provide bug fixes or new features/devices, so the key is something you really want to protect

  • Of course people won't be happy as I'm not happy at all btw, but we can't change how Garmin sets things up. And I'm even paying for it. If I choosed the free path, this wouldn't be a problem as I could fix it with free acces to another watch face. But nothing in this makes any sence, so don't try to make me feel guilty about this, as my motivation to continu develop garmin stuf is already cut to ground level atm.

  • Nope, it is a goner.

    It's kind of a long shot, but you could try to use a file undelete utility like Recuva to see if the file can be recovered:

    https://www.ccleaner.com/recuva 

    The fact that you already reinstalled your OS (and probably restored a bunch of files from the backup) does make it much more unlikely that the file can be recovered tho :/, as opposed to a situation where a file was newly deleted.