How to get a permanent token of a single raw file of a private github repo that will lasts for several days

1

How to get a permanent token of a single raw file of a private github repo that will lasts for several days.

I have a shell-script file in a private repo of github & after clicking raw button i get url with which i can download that file using ‘wget’. Link is something like below. Now the raw token=AKNX3RPGGGQA5KGXL5AQYUS7DBW4I remains valid only for 30secs or 1 minute.

i wanna get or generate a token for this raw file in my private repo that will lasts for several days, as this link will be provided to my clients to run few pre-defined tasks in the script(we don’t wanna give my clients my github personal access token).

How i can achieve this scenario. Quick response will be appreciated. Thanks

https://raw.githubusercontent.com/username/repoName/master/hello.sh?token=AKNX3RPGGGQA5KGXL5AQYUS7DBW4I

wget https://raw.githubusercontent.com/username/repoName/master/hello.sh?token=AKNX3RPGGGQA5KGXL5AQYUS7DBW4I -O hello.sh

Hi @MohdRashid01 - Thank you for being here! I’m afraid it’s not possible to create a permanent raw.githubusercontent.com token, sorry!

You could create a secret Gist, which would have a similar effect?

https://help.github.com/en/github/writing-on-github/creating-gists

1 Like