Stitch CLI help needed

I’m trying to deploy and host via Github using the CLI and I’m having a hell of a time.

I’ve tried following every doc page and blog post to create sample apps from mongodb official sources and it’s just not working. I’m able to connect with my stitch api key and the atlas api key and the cli returns the user.
from the cli I can “import” and the prompt asks me to enter a “new app” and then it brings up my list of current stitch apps and allows me to select it and then i get a 403 forbidden. the error from the console lists but that redirects to the new unified login overview page.

I have a cluster, linked to my stitch api on the UI, api keys are generated, I linked github successfully and selected the repo.

Then I tried exporting the app from the UI but I’m getting a “cannot read app id from source control error” when i push it to the repo.

I’m not sure what else to try. HELP!

Hi Jeremy – If the CLI is producing a 403 when you try to import an application then this may be an indicator that they Atlas API key that you created does not have “Project Owner” permissions for the project associated with your Stitch application – could this be the case?

When you are trying to publish the app to your repo, can you outline the steps that you are going through? Are you exporting the application for source control?

Hi Drew

that appears to have made the deployment successful. Now i’m having an issue where I don’t have the hosting files uploaded from the github deployment. Am I correct assuming the hosting files would be transferred to the “hosting” tab after a commit? If i try the stitch app link, I’m getting an error page.

I’ve read I need to include a metadata.json file but the instructions are unclear for a complete noob like myself. :slight_smile: What is a “file resource path” and what are the expected entries in this file? Mongo Docs explain the file creation and the values but not in laymen terms. A sample file here would be awesome or at least one of the tutorials walking through this. I scoured github but didn’t find any. Is this type of file supposed to be committed? I found a few scripts written to deploy the same file but the repo’s don’t have the actual file generated. Seems they are using this script to deploy this file away from the commit.
I tried adding an empty file with an empty array but I’m getting an error on deployment

Failed: could not find /hosting/files directory	


so this post helped me a bit to understand the folder structure. Now the files are displayed in the hosting tab on the UI and the site is working.
I came up with this:

      "path": "/hosting/files",
      "attrs": [{
        "name": "index",
        "value": "text/html"
        "name": "data",
        "value": "application/x-javascript"
        "name": "styles",
        "value": "text/css"