Problem connecting to dev environment

robjwood
Member

Using the CLI, I've been able to generate a new key and fetch content from the 'design tool' section of our production CMS (templates, CSS etc.) and upload these change back the live environment. 

 

I want to be able to do the same but for a sandbox environment. I've created a dev account and set up a sandbox environment but I can't seem to connect to it.

 

I've tried adding an additional entry to the `hubspotconfig.yaml` file that contains the name and portalId of my sandox. Using `hs auth` always tries to provide a key for the production portalId instead of the sandbox portalId.

 

Is there an obvious step I'm missing?

0 Upvotes
4 Replies 4
dennisedson
Community Manager

@robjwood , when you use the hs auth command, you should be directed to a login page that should display an option that says "view your other accounts"

Clicking on it, you should be able to select your dev portal from the list. 

That will bring you to the personal access key that is for that specific portal which you can then copy and paste back into the terminal.

Are there any steps that you are not seeing when attempting this process?

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
robjwood
Member

@dennisedson Thanks for the reply.

This is what I see when I run hs auth:

 pak.png

It only shows one account. When I go to my account settings however, I see this:

 

accounts.png

The pinned account at the top is the account shown in the previous screenshot. Should I be able to select either of the other two accounts from the PAK page? 

0 Upvotes
dennisedson
Community Manager

Before you see that screen with the key, you should see this:

Portal_Recommend___HubSpot.png

 Click view your other accounts and then you should see your test account.

You also could try pinning the test account and it may show up on that initial screen 🤔

Here is the link to display all of your portals.

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
robjwood
Member

Thanks @dennisedson. Unfortunately, when I run hs auth, I don't see the screen you mention, it goes straight to the PAK key page (even after pinning the test account)?

0 Upvotes