GitHub Integration - hubspot.config.yml Error

Hello everyone,

After setting up my local environment and my default hs account, I was trying to create a GitHub action to continous integration with the CMS.

The problem is once I commit I receive this message on the action deploy:

Error: Unable to load config from environment variables.

Error: A hubspot.config.yml file could not be found. To create a new config file, use the “hs init” command.

Error: An account needs to be supplied either via “--account” or through setting a “defaultPortal”

Error: No config was found

Error: Process completed with exit code 1.

Could it be because I added hubspot.config.yml to .gitignore?
I’m a bit confused because before adding it everything was running without errors except I was receiving this warning:
[WARNING] Security Issue Detected

[WARNING] The HubSpot file can be tracked by git

[WARNING] To remediate:

-Move the config file to your home directory (which I did and did not solve the issue)
- Add .gitignore pattern “hubspot.config.yml” to a .gitignore file in your repository (which I also did)

-Ensure that the config file has not already been pushed to a remote repository (what’s the best way to undo this action if this is the cause of the problem?)
I’d appreciate your help a lot :slightly_smiling_face:
Thank you!

Hey, @FilipaPF :waving_hand: Thanks for reaching out. Did you get his resolved?

In my understanding of things, it is a good practice to add hubspot.config.yml to .gitignore to prevent exposing sensitive data such as API keys.

Have you considered using GitHub Encrypted Secrets for your project?

Best,

Jaycee

Hello Jayce,

Yes thank you,

It is solved :slightly_smiling_face:

Have a nice day

Excellent! Thank you for letting us know. — Jaycee