Closed shariqmalik closed 1 year ago
@shariqmalik was getting this issue as well. What worked for me just rename .env.example
to .env
, then add in your KEY token in file and save changes. Then vercel should update .env
file if linked with repository
FYI make sure your repo is private so token would not be exposed to public
Steps 11 and 12 add the token to the app. After you do those steps it should work
@shariqmalik was getting this issue as well. What worked for me just rename
.env.example
to.env
, then add in your KEY token in file and save changes. Then vercel should update.env
file if linked with repositoryFYI make sure your repo is private so token would not be exposed to public
I've created a .env file with the token and then runned vercel
but it still doesn't work
I have even added the token to the app
@shariqmalik was getting this issue as well. What worked for me just rename
.env.example
to.env
, then add in your KEY token in file and save changes. Then vercel should update.env
file if linked with repositoryFYI make sure your repo is private so token would not be exposed to public
I've created a .env file with the token and then runned
vercel
but it still doesn't workI have even added the token to the app
It looks like your issue is, you are in the repo main branch and not the branch name "vercel"
@shariqmalik was getting this issue as well. What worked for me just rename
.env.example
to.env
, then add in your KEY token in file and save changes. Then vercel should update.env
file if linked with repository FYI make sure your repo is private so token would not be exposed to publicI've created a .env file with the token and then runned
vercel
but it still doesn't work I have even added the token to the appIt looks like your issue is, you are in the repo main branch and not the branch name "vercel"
I'm in the vercel branch and I've changed my git branch by running git checkout vercel
before running vercel
to deploy
I mean edit .env file in vercel branch
in the repo that is connected .. it looked like from in the screenshot you did it in main branch. If still not working just make a private repo with vercel branch contents, connect repo in vercel and then rename file(.env.example) and add key token and save
I mean edit .env file in
vercel branch
in the repo that is connected .. it looked like from in the screenshot you did it in main branch. If still not working just make a private repo with vercel branch contents, connect repo in vercel and then rename file(.env.example) and add key token and save
I've just created a new private repo, added the .env with the token in the vercel branch, recreated the project on verce, changed the Production Branch in vercel, added the token even in the vercel panel, but still don't working. ..
you can create your private repo on main branch
with vercel contents. Also i turn off 'Include source files outside of the Root Directory in the Build Step' in vercel settings in general
I've alerady turned off "Include source files outside of the Root Directory in the Build Step" but still not working. Now i try to recreate the repo with the only vercel content as main branch but i think that nothing will change...
@trinib I tried but just like @Klay4 still having the same issue.
Let me know if there is anything I'm still missing.
@Klay4 Things worked for me.
Thanks a lot, @trinib & @DenverCoder1
I have added to the steps to redeploy the app after setting the environment variable as it seems to be required (https://github.com/DenverCoder1/github-readme-streak-stats/commit/9b0767eada70dd47180e41afe6205eb60755ac08).
Importing a GitHub repo can simplify the steps for those who choose to do it that way, so thanks for sharing that :+1:.
Also, I'd recommend against putting active tokens in a GitHub repo even if it's private. If it's private it's less likely to be an issue, but files in GitHub repos are not a secure way of storing secrets. .env
should only be used if running locally or on a dedicated server. If using a service that provides other methods of inputting secrets (such as Heroku or Vercel), the service's recommended method should be used.
Describe the bug I'm having issue with the deployment on vercel
To Reproduce Steps I followed for deployment:
Screenshots Having the following .env related error.