230616 개발일지 TIL - Something went wrong! file an issue at https://tiny.one/readme-statsMaximum retries exceeded Please add an env variable called PAT_1 with your github token in vercel

The Web On Everything·2023년 6월 16일
0

개발일지

목록 보기
34/269

Github Stats의 오류

Something went wrong! file an issue at https://tiny.one/readme-stats
Maximum retries exceeded
Please add an env variable called PAT_1 with your github token in vercel

github의 overview에서 Most Used Languages와 github stats를 보여주고 있었는데
자정 쯤에 들어가니 제대로 불러오지 못하고 위와 같은 문구를 보여주고 있었다.

자정이 지나면 리셋이 되어 제대로 보여질 수 있을 줄 알고 재접속을 해보아도 마찬가지의 현상이 일어났고 캐쉬를 지워도 여전한 현상이었다.

구글링을 통하여 깃허브 issues에서 위와 같은 오류에 대한 글을 발견하였다.

많은 댓글 중에 제일 좋아요 표시를 많이 받은 것은 shift + f5 였는데 이 방법을 시도했기 때문에 패스했고 아래 방법으로 시도하였다.

Hi everyone.

Sorry for the inconvenience.
I will highly recommend deploying github-readme-stats on your own vercel instance to fix this issue, while I try to find a fix. Currently I'm unable to find any root cause.

Consider deploying on your own fork. follow the guide -> https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance

Youtube video tutorial: https://www.youtube.com/watch?v=n6d4KHSKqGk&feature=youtu.be&t=107

Also after forking make sure to open vercel.json and change the maxDuration option to 10.

vercel 인스턴스에 github-readme-stats를 배포하라는 것이었는데 근본적인 원인을 찾을 수 없다고 했다.

쉽게 말해서 github-readme-stats를 나의 액세스 토큰과 연결하여 vercel에 배포한 후 그 주소 값을 넣으면 되는 방법이다.

그래서 github-readne-stats를 fork로 가져온 후 setting -> developer settings -> github app -> personal accss tokens -> generate new token으로 note명을 적어준후 아무것도 체크하지 않고 generate token을 클릭해서 키를 발급 받는다.

vercel에서 github-readme-stats를 import하여 deploy전에 environment variables를 열어 name에 PAT_1, value (will be encrypted)에 발급받은 토큰을 넣어 add를 해주면 된다. deploy후 domains에서 주소를 복사하여 github의 overview에서 사용하고 있는 readme에 Most Used Languages와 github stats의 vercel 주소를 바꿔서 적용해주면 된다.

위와 같이 정상적으로 보여지는 것을 확인하였다.

근본적인 원인을 모른다고 했지만 vercel이 무료 호스팅으로 배포도 해주기도 하고 유명한 github유저들의 주소를 그대로 복사해서 사용할 것 같은데 같은 url의 트래픽이 몰려서 그렇게 되었을 것 같다는 생각이 든다.

profile
오늘은 무슨 오류를 만날까?! 널 만나러 가는 길~ LOL

0개의 댓글