Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Raw File - Can I get a permanent link?

Tags:

github

I want to be able to download the latest version of an xml file containing data that exists in my github repository. However, the token at the end of the file changes when I commit a new version of the file.

Is there a way to prevent the token from changing or somehow find out what it is programmatically?

I need a permanent link I can access...

like image 511
Adam Levitt Avatar asked Aug 29 '17 02:08

Adam Levitt


1 Answers

The token in the URL has nothing to do with the file, it's an authentication token that is needed to download the raw file from a private repo. It doesn't change when you commit a new file, it changes when your Oauth session expires and you login again. To get one that doesn't change, just make a Personal Access Token (https://github.com/settings/tokens) and replace the token in the URL with that.

like image 179
Jason Kohles Avatar answered Nov 16 '22 02:11

Jason Kohles