Hello by build I get this error
Error: error:0909006C:PEM routines:get_name:no start line
It is because I set .env variables … they working fine on computer but there is some issue.
I need advice to debug deploy Netlify App
thanks for help
Hello by build I get this error
Error: error:0909006C:PEM routines:get_name:no start line
It is because I set .env variables … they working fine on computer but there is some issue.
I need advice to debug deploy Netlify App
thanks for help
hi there, welcome. where and how are you trying to set .env variables? We need a little more information on what you are trying to do before we can assist.
Thanks for answer… well they are set in Build & deploy key: GATSBY_CLIENT_EMAIL value: “projec…” it looks like it dont want to read quotation marks (") … on my computer works nice and if I get out quotation marks it runs same error like here
And using in gatsby-config on top I have
require(“dotenv”).config({
path: .env.${process.env.NODE_ENV},
})
and need to use it in
credentials: {
client_email: GATSBY_CLIENT_EMAIL,
private_key: GATSBY_PRIVATE_KEY
},
I have had a similar issue using a Firebase private key as an env variable.
If it is a similar issue, you could try processing the GATSBY_PRIVATE_KEY with JSON.parse()
credentials: {
client_email: GATSBY_CLIENT_EMAIL,
private_key: GATSBY_PRIVATE_KEY[0] === '-' ? GATSBY_PRIVATE_KEY : JSON.parse(GATSBY_PRIVATE_KEY)
}
See previous post:
Thank you. It did not work like you wrote but when I set it together it worked.
credentials: JSON.parse(${process.env.GATSBY_CREDENTIALS})
Awesome
glad you worked it out
@luke I am facing the same issue. But I am creating an environment variable to access my private keys with double-quotes. Settings > Build & deploy > Environment > Environment variables

Getting this error:
Hi, @rajan-magar, would you please take a look at these topic and let us know if they are helpful or not?
Hi @rajan-magar . I got the same issue.
I added a quote to SERVICE_ACCOUNT_PRIVATE_KEY. Like
SERVICE_ACCOUNT_PRIVATE_KEY="----key----"
Also in code, I added:
JSON.parse(SERVICE_ACCOUNT_PRIVATE_KEY)
It helped me.