Personal Access Token deleting itself #24692
-
I set up a website using GH pages to showcase some of my repos. I had tested previously on repl.it with no issues, and I was ready to migrate to Github. However, I found that my personal access token had deleted itself when my page wanted to grab the repo info (similar to this problem). Here’s the code I use to fetch the repo data.
How can I fix this issue? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Probably you commit the token to your GitHub repo. if its the case Github will remove the token immediately. so you need to set your token as a variable environment in your system. |
Beta Was this translation helpful? Give feedback.
-
Personal access token which has not been used for one year is automatically deleted for security reason. See: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
|
Beta Was this translation helpful? Give feedback.
Probably you commit the token to your GitHub repo. if its the case Github will remove the token immediately. so you need to set your token as a variable environment in your system.