Issue
I've made a repository on GitHub and have added a Repository secret. However, I can't seem to grab the secret's value. Any help would be greatly appreciated!
Solution
So I made a workaround for this. Instead of using GitHub to store my secrets, I used a .env
file and .gitignore
to hide this file.
Giving a TOKEN value in the .env
file, I call it within Python by importing os
and dotenv
like so:
from dotenv import load_dotenv
load_dotenv()
import os
token = os.getenv("TOKEN")
Answered By - Larry-Larriee Answer Checked By - Pedro (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.